Skip to content

Commit

Permalink
HPCC-32277 ECL Watch v9 fix async multiselect onChange
Browse files Browse the repository at this point in the history
fix an issue where after clearing the selected items from an async
dropdown, you could not make any new selections

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Jul 22, 2024
1 parent 6441315 commit ab38ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esp/src/src-react/components/forms/Fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const AsyncDropdown: React.FunctionComponent<AsyncDropdownProps> = ({
const keys = selectedKey !== "" ? selectedKey.split(valueSeparator) : [];
let items = [...selectedItems];
if (keys.length === items.length) return;
if (selectedKeys !== "" && selOptions.length && selectedKey === "") {
if (selectedKeys !== "" && selOptions.length && selectedKey === "" && selectedKeys === items.map(i => i.key).join("|")) {
setSelectedItems([]);
return;
}
Expand Down

0 comments on commit ab38ca6

Please sign in to comment.