Skip to content

Commit

Permalink
A little bit of clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdilauro committed Feb 29, 2024
1 parent 139e7d7 commit fdac3dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/components/InputList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -262,14 +262,15 @@ export default class InputList extends React.Component<
}
}
// Items that have already been selected, and should be eliminated from the menu.
const listItems = this.state?.listItems
? this.state.listItems
: this.props.value || this.props.setting.default || [];
const listItems =
this.state?.listItems ||
this.props.value ||
this.props.setting.default ||
[];
// Items that haven't been selected yet.
const remainingOptions = listItems
return listItems
? allOptions.filter((o) => listItems.indexOf(o.props.value) < 0)
: [];
return remainingOptions;
}

updateNewItem() {
Expand Down

0 comments on commit fdac3dc

Please sign in to comment.