Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SilvaDreamdeal's avatar

V-Autocomplete too slow

I have a v-autocomplete where the user needs to choose the material that wants to work with.

Something like: 'Which materials do you need to use today?'

1 - Brick 2 - Fork 3 - Nail

The problem is that the list of materials is above 49k. That means I need to filter some data. I am doing that by typing a string, and when it has 4 chars or more, it does the request to the database (it will always have more than 4 chars because it will have a code with 10 chars before the name)

Is there a way that I can use to start typing in the v-autocomplete and after the 4 chars, it will load the "items" prop?

Version: Vue 2

<v-autocomplete                                
       v-model="newMaterial.material_id"
       :items="materiais"
       label="Material *"
/>

(...)
loadMaterials(){
// If search string more than 4 chars, 
                  //Server request and fill the materiais array
}
                                		
0 likes
2 replies
SilvaDreamdeal's avatar
SilvaDreamdeal
OP
Best Answer
Level 1

I've completed the task doing the stuff in other way. But for register, I think its possible but we need to use combo box. If I get an example I will post it

Please or to participate in this conversation.