From fdac3dc372b4f7d18f9c317439924caeb6e63844 Mon Sep 17 00:00:00 2001 From: Tim DiLauro Date: Thu, 29 Feb 2024 11:33:58 -0500 Subject: [PATCH] A little bit of clean up. --- src/components/InputList.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/InputList.tsx b/src/components/InputList.tsx index ee2880a0c..5ef0ab241 100644 --- a/src/components/InputList.tsx +++ b/src/components/InputList.tsx @@ -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() {