Skip to content

Commit

Permalink
HPCC-32389 ECL Watch v9 fix grid selection onFocus
Browse files Browse the repository at this point in the history
fixes an issue where the list pages would lose track of any selected
items upon window blur and refocus

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Aug 6, 2024
1 parent a1db710 commit bcafb53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esp/src/src-react/components/controls/Grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ const FluentStoreGrid: React.FunctionComponent<FluentStoreGridProps> = ({
setTotal(total);
});
storeQuery.then(items => {
const selectedIndices = selectionHandler.getSelectedIndices();
setItems(items);
setSelection(selectionHandler.getSelection());
selectedIndices.forEach(index => selectionHandler.setIndexSelected(index, true, false));
});
}, [count, selectionHandler, start, store], [query, sorted]);

Expand Down

0 comments on commit bcafb53

Please sign in to comment.