Closed wc-matteo closed 3 years ago
I think there are few usage scenarios for this. @07akioni
@wc-matteo I think set value to sorted value in on-update:value
callback is enough.
but how can you sort them?
I was thinking by drag n drop
I was thinking by drag n drop
Implement drag and drop inside select will take tons of code (and it's not useful).
but how can you sort them?
<n-select :value="value" @update:value="v => this.value = Array.from(v).sort()" />
I was thinking by drag n drop
Implement drag and drop inside select will take tons of code (and it's not useful).
I mean there. Not in the list
the use case is, for example, to select a primary value (so you would put it first)
I was thinking by drag n drop
Implement drag and drop inside select will take tons of code (and it's not useful).
I mean there. Not in the list
I mean here too, the order follows the value of the select, so you can order them everytime the value changes.
I mean let the user decide the order tho .-.
I mean let the user decide the order tho .-.
This can be done by add dnd listeners to tag by render-tag
. Since select has many composition of props and we expect everyone should work, for example filterable, we can't implement the feature with no conflict with other props in a reasonable time.
fair enough!
This function solves the problem (这个功能解决的问题)
for example, being able to define which of the selected value is the main one (you would make it the first)
Expected API (期望的 API)
maybe add a prop like sortable-values?