Creating a Select Using Livewire, Alpine, and fusejs.io
I continued working on the select from last time... Got it working.. Well... I could probably clean things up and make it neater, but I'll leave it here for now
GGAMI·
I continued working on the select from last time...
Got it working..
Well... I could probably clean things up and make it neater, but I'll leave it here for now... I've got a mountain of work to do,
I should also try modifying the things I was already using Select2 for. It supports searching, and the list is displayed in advance...
It works with both the mouse and the keyboard.
For reference, the data is [{id:1,name:Kkami},{id:2,name:Dolce}]
in this format.
For now, it works incredibly fast with 20,000 data entries, without any lag at all.
It seems like it could handle even more??? I'll leave it here for now; you can also set the number of items displayed using limit.
The problem with Choices.js was that it was a little difficult to customize the design, and although I thought there wouldn't be any lag since it was pure vanilla JavaScript, there was lag. That was a bit disappointing.
So I ended up making it myself with Alpine.js in Livewire...
Fuse.js really seems to be an amazing, lightweight, and fast tool...
I think I was able to easily retrieve values through the Fuse.js library!