[Suggestion] Select dropdown use separate field for looking up from reference id instead of search field for REST source
Is your feature request related to a problem? Please describe. Currently if you have set a field to be how you search, and you set the value saved to the id of that field, when it loads it tries to use the existing search field to search for that id. This issue compounds with multi select as it comma separates the values, which conflicts with the data you are searching can contain commas in it too.
Describe the solution you'd like
Maybe add a separate url you can hit to get data by reference, or an additional field to pass get by reference for example if you use the queryString search you could have another query string as byRef, there could be an option to load each item one at a time (which might have some caching benefits) or pass everything as an array
Describe alternatives you've considered Looking for commas in the search did come to mind however the search data can contain commas and the user may try to include the comma in the search
I am having a hard time understanding what you mean when you say "when it loads it tries to use the existing search field to search for that id. "... Also, what does the "valueProperty" have to do with this issue? That only affects how the value is saved, and should not affect the "search" property which is used when you type in the text field to add a query parameter to the API. This should not be affected by the valueProperty.
@travist for example if you have an search api return [{ id: "JC", name: "Connor, John" }, { id: "JK", name: "Kennedy, John"}] for endpoint?query=John. That works fine but I want to save only the reference id so for example. selectedPeople=["JC", "JK] that also works, however when it tries to load it does the query endpoint?query=JC,JK (decoded) but that makes no sense as someone might query "Kennedy, J"
@CaptainGlac1er Can we get a simplified example to show the issue you are talking about? It sounds more like an implementation issue than a library issue.
Yeah I can see about making one next weekend, unfortunately got plans this weekend. Side note I put in a MR to fix an issue with required field with openstreetmap in the core formio library earlier.
I have made progress making a demo, just have been really busy sorry about that