The options passed to v-select are a suggested list of User which can be added to an Organization. If none of the suggestions match the searched user. It is possible to type in an e-mail which then is added. While that creates a new option, i want to check if the E-Mail is already in the added or suggested Members.
Describe the solution you'd like
If either the createOption throws or returns null/undefined adding an option should be omitted.
Additional context
I would prefer the throwing variant, because it is maybe important for someone that adding undefined/null works.
The
options
passed to v-select are a suggested list of User which can be added to an Organization. If none of the suggestions match the searched user. It is possible to type in an e-mail which then is added. While that creates a new option, i want to check if the E-Mail is already in the added or suggested Members.Describe the solution you'd like If either the
createOption
throws or returns null/undefined adding an option should be omitted.Additional context I would prefer the throwing variant, because it is maybe important for someone that adding undefined/null works.