Default query result duplicates the options of select options.
Previously I have asked a question regarding how to create a custom option in select input ask-any-question-archivedHow to customize useSelect hooks optionLabel with multiple value? and implemented a solution provided by @Omer. But now I have an issue with that process as my default query populates the options value with other options which results the same value being shown twice. For example I have a useSelect hook to get a data as below:
Here in my
Here in my
allLayoutOptions the data will be populate twice as I get the value from queryResult and the same value from the defaultValueQueryResult, is there a better solution you can suggest me? Or else I am thinking of a solution as to filter out the duplicated value from allLayoutOptions. Is this the solution that I should move on with?