ui: fix user_select_multi

This commit is contained in:
undefined committed 2022-04-05 06:07:30 +08:00
1 parent 8f4a63006a
commit 43c4866eb2
2 files changed
+4 -6

No files matched your search

@@ -32,7 +32,7 @@ export default class UserSelectAutoComplete<Multi extends boolean> extends AutoC
}
value(): Multi extends true ? number[] : string {
if (this.options.multi) return this.ref?.getSelectedItems().map((item) => item._id) ?? this.$dom.val();
if (this.options.multi) return this.ref?.getSelectedItemKeys().map((i) => +i) ?? this.$dom.val();
return this.ref?.getSelectedItems()[0] ?? null;
}