We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b73aa54 commit 83da143Copy full SHA for 83da143
1 file changed
resources/js/packages/ui/src/Input/MultiselectDropdown.vue
@@ -35,7 +35,8 @@ watch(open, (isOpen) => {
35
sortedItems.value = [...props.items].sort((a, b) => {
36
const aSelected = model.value.includes(props.getKeyFromItem(a)) ? 0 : 1;
37
const bSelected = model.value.includes(props.getKeyFromItem(b)) ? 0 : 1;
38
- return aSelected - bSelected;
+ if (aSelected !== bSelected) return aSelected - bSelected;
39
+ return props.getNameForItem(a).localeCompare(props.getNameForItem(b));
40
});
41
}
42
0 commit comments