Skip to content

Commit

Permalink
reset state on prop change for detailList
Browse files Browse the repository at this point in the history
closes #1977

Signed-off-by: Lukas Boll lukas-bool@web.de
  • Loading branch information
LukasBoll committed Aug 15, 2022
1 parent 0f0470f commit 4b1ebef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ export const MaterialListWithDetailRenderer = ({
);
const appliedUiSchemaOptions = merge({}, config, uischema.options);

React.useEffect(() => {
setSelectedIndex(undefined);
}, [schema]);

return (
<Hidden xsUp={!visible}>
<ArrayLayoutToolbar
Expand Down

0 comments on commit 4b1ebef

Please sign in to comment.