A
A
alpinuse2020-05-22 16:04:03
Vue.js
alpinuse, 2020-05-22 16:04:03

How in vue.js to make sure that when using search, the incoming data is formatted as needed?

The project has a standard search in the component

<v-text-field
                        v-model="search"
                        append-icon="search"
                        label="Поиск"
                        single-line
                        hide-details
                        clearable
                >
                </v-text-field>

in the table the data is textual, the values ​​are different. When searching through copy-paste - it works properly. If the input in the search field comes from a scanner (manual), the data is distinguished by special characters and the search falls off. how can i fix this?

type data: 10460795029015221000000000001X91ffd092P8 - in the table
came from an external scanner -10460795029015221000000000001~X91ffd~092P8

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Ivanov, 2020-05-22
@alpinuse

watch: {
    search() {
        this.search = this.search.reapalce("~","");
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question