shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.66k stars 991 forks source link

very slow in vue 3 #1672

Open hayrandere1 opened 1 year ago

hayrandere1 commented 1 year ago

Hi, I use a lot multiselect components in one page. When I did change event, the page waiting average 5 seconds. This is very slow for my project. If I dont use v-model, That running fast, but It dont save data. You writed to use :value but dont working it.

Examples; https://vue-multiselect.js.org/#sub-custom-configuration We only used :value, don't v-model but I don't working for vue 3

My codes;

userRoles ( this have 100 parent and children ) [ { "id":"x", "parent":null, "route_name":"roles.statisticRoles", "controller":"#", "action":"#", "model":null, "created_at":"2023-01-31T07:50:35.000000Z", "updated_at":"2023-01-31T07:50:35.000000Z", "children":[ { "id":"x", "parent":1, "route_name":"user.statistics.queue_performance", "controller":"Statistic/QueueController", "action":"queue_performance", "model":"[\"queue\"]", "created_at":"2023-01-31T07:50:35.000000Z", "updated_at":"2023-01-31T07:50:35.000000Z" } ] } ]

mattelen commented 1 year ago

Are you able to provide a link to a repo reproducing this issue? As you can imagine, there are many different variables that contribute to the performance on a webpage. If not using v-model makes your application run faster, then I wonder if its watchers or computed vars outside of the multiselect component that could be contributing.

By putting the code in question it its own repo, this also help eliminates or proves different theories around what could be the issue of the slow webpage. So if you could recreate this issue it its own git repo (not a code sandbox) and pop it in the chat, then we can investigate.