Hooong, hooong I tried to use select2 with Livewire.\ But select2 used jQuery, so I had no choice but to use jQuery alongside it.\ It really wasn't for me. So t
GGAMI·
Hooong, hooong
I tried to use select2 with Livewire.
But select2 used jQuery, so I had no choice but to use jQuery alongside it.
It really wasn't for me.
But once the data started to exceed 20,000 records, I ran into the problem of having to fetch all 20,000 records every time I opened the modal...
It was just too inconvenient...
So I improved things by using axios to fetch only the SQL records relevant to the search.
For reference, after calling setChoices on the items received via axios, I had to reload the search results by calling _handleSearch(event.detail.value).
Since the Choices project itself hasn't been updated much... I did hesitate over whether I should use it.
But anyway... I suppose I could just use Choices.js...
While looking around, I came across https://fusejs.io/,
and I'm going to try building one myself with Alpine + Tailwind CSS using Fuse.js.
Well then, I'll write about the results with Fuse.js in the next post.