Open SOONwasTaken opened 4 months ago
Hey @SOONwasTaken,
Thank you for bringing this behavior to our attention. It's look like a valid bug. Our team will fix it as soon as possible.
If you have any other questions, please don't hesitate to submit a ticket in our support system. Greetings, Ivaylo
Hello Ivaylo,
Thanks for letting me know about this. Hopefully all goes well.
Kind Regards.
Describe the bug Using a ComboBox under these specific conditions:
value-primitive
is set to trueallow-custom
is set to truedata-item-key
Attempting to set a custom value will set the value of the ComboBox to an empty string. This only occurs if the value of the v-model does not currently map to data item value.
Notice also that the "X" to clear the value appears, despite not mapping to a value. Clearing the empty value or mapping the value to any valid selection allows for a custom value to be entered again.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the custom value to be populated. I also expect that a value that is not present in the ComboBox's data items will not populate the ComboBox with an empty string value.
Screenshots N/A. Can only be reliably seen through the demo.
Browser
Additional context This causes problems with utilizing default values as we are unable to reliably set the value of a DTO's unique identifier (such as an ID) to a value that will empty the ComboBox (like a null value). We need to utilize the v-model to properly bind the ComboBox to our DTO, however, doing so gives us this issue. We would like to make this as good for User Experience as possible, and having the default value need to be cleared in order to enter a new custom value is bothersome.
Our ComboBox component maps KeyValuePair<string, string> values to each selection. We get these values via an API request to our backend, and populate the data items with the response. The text field is the value, whereas the value field is the key (in this case, our IDs).