Skip to content

Commit

Permalink
* picker: set default key with value.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Jan 15, 2024
1 parent 0b3b732 commit 569b269
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/picker/src/component/picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export class Picker<S extends PickerState = PickerState, O extends PickerOptions
await this.changeState({loading: true} as Partial<S>);
const loadItems = await this.load();
newState.items = loadItems.filter(x => {
x.key = x.key ?? (x.value as string);
x.value = String(x.value);
if (this.isEmptyValue(x.value as string)) {
return false;
Expand Down

0 comments on commit 569b269

Please sign in to comment.