-
-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
What version of FlyonUI are you using?
2.0.1
Which browsers are you seeing the problem on?
All browsers
Reproduction URL
https://flyonui.com/docs/advanced-forms/advanced-select/#remote-data-selection
Describe your issue
When selecting an option of an advanced-select component, the HSSelect.value has the right selected value but the select tag has its value field reset to the first declared option (ie. the first element of the remote API response).
When embedded in a form, the SubmitEvent has not the right value. Example:
const form = document.getElementById("form");
form.addEventListener("submit", (event) => {
const data = new FormData(event.target);
console.log(data.get("select")); // The `select` element value of an `advanced-select` is the first `option` value, when we would expect the select value
});
Of course, it is possible to get the value from the HSSelect instance but it breaks some frameworks that rely on the standard API (e.g. FormData).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels