asynchronous request in select

Good afternoon, I have two select fields. The thing is that when selecting the first select field, I need to load the filtered data based on the first select into the second select. How can you do this in Twill with minimal effort?
I
ifox58d ago
Hi, you need to use more than 2 select fields to do this. For each of the values in your first select, you would need a connected select field.
T
trompix54d ago
But what if in my first select, for example, records from the category table in the database are displayed and there are, for example, 100 records and not specific ones? and over time there will be more of them?
T
trompix54d ago
I found how to solve something similar for the example with the select field (it’s awkward and ugly, but for now it’ll do for testing), but I don’t understand how to do this with multi_select. Maybe somehow you can request data asynchronously?
No description
I
ifox39d ago
You'd need to create a field for all combination of values in your first multiselect, which obviously doesn't scale. We don't have a native way to asynchronously refresh the field, but you can create your own field, and use livewire, for example. Another option would be to use connected browser fields for this use case, because the browser field is fetching records asynchronously when the modal is opened, and it can take parameters from another browser field
Want results from more Discord servers?
Add your server
More Posts