clear selected items if storage was changed
@@ -2551,6 +2551,7 @@ export default class DataStorage extends React.Component {
}
componentDidUpdate (prevProps) {
+ this.clearSelectedItemsIfRequired();
this.updateStorageIfRequired();
}
@@ -2561,4 +2562,10 @@ export default class DataStorage extends React.Component {
this.props.showVersions
);
};
+
+ clearSelectedItemsIfRequired = () => {
+ if (this.storage.storageId !== this.props.storageId) {
+ this.clearSelection();
+ }
+ };
}
