Select and FIle Upload

Is there a way to update the options in the select field based on the uploaded file?
6 Replies
Patrick Boivin
Patrick Boivin16mo ago
Can you describe what you're trying to do exactly? What's the use-case for this?
Lacunacoil
LacunacoilOP16mo ago
It's like a modal that has steps inside. The first step is the uploading of the CSV. The second step is where the user matches the CSV columns to the system's database. I currently did a hacky workaround by creating a hidden text input. And then afterStateUpdated of the FileUpload I $set the value of the hidden input.
Lacunacoil
LacunacoilOP16mo ago
Here's the snippet of the FileUpload and TextInput
Lacunacoil
LacunacoilOP16mo ago
And this is the Select
Patrick Boivin
Patrick Boivin16mo ago
The hidden field is not a bad idea actually... I think I would add a ->dehydrated(false) to make sure the data is ignored on submit
Lacunacoil
LacunacoilOP16mo ago
Would add the dehydrated. I think having the hidden input will force update the dom making the options updated.
Want results from more Discord servers?
Add your server