-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing value instead of label on single search #59
Comments
What exactly do you mean? I already return it like a value ID for the DB like I posted on the example |
Oh yes you're right, I forgot you also need to set the options:
after you load the data from the DB live select tries to match the value Again, you could argue that the label is there in the selected value, so it should use that one. I'll try to find time to work on these issues with structs and maps soon |
Thank you for taking the time to look into it. Great work BTW |
Also, its not about the So if, the live_select already have some value on it when you load the page, it shows the ID, I will try to do something with the value_mappers and let you know |
warning: value_mappers are not implemented yet :) it was just brainstorming for an idea |
Thx for the heads up haha :) |
I'm having the same issue here. Can we reopen the ticket? |
This happens here in an inconsistent manner, sometimes it grabs the correct label and sometimes it grabs the value as the label. I have played around value_mapper and a few other things but to no avail. |
@caiohsr14 this sounds like some kind of race condition to me. If you share your code, I can take a look |
Turns out after some debugging (and understanding more the framework), it was just some misusage of |
If a field comes from the database, instead of showing the value from the label, it is showing from the value.
For example, when considering the map below:
%{label: "test", value: "1"}
In the search it would appear correctly as
test
,When the data is saved and reload using the data from the db it shows as
1
The dropdown search continues working as it should.
Step 1
Step 2
Step 3
Save the record
Step 4
The issue appears

The text was updated successfully, but these errors were encountered: