Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-2190 (pull request #558)
Browse files Browse the repository at this point in the history
Removed filter list button from restoration editing

Approved-by: Bill Smith
Approved-by: Jonathan Johnson
  • Loading branch information
rmathis committed Nov 1, 2021
2 parents 1c1070a + c05f8df commit 032a5bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ui/src/app/metadata/editor/MetadataEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { checkChanges } from '../hooks/utility';
import { createNotificationAction, NotificationTypes, useNotificationDispatcher } from '../../notifications/hoc/Notifications';
import { useUserGroup } from '../../core/user/UserContext';

export function MetadataEditor ({ current, reload }) {
export function MetadataEditor ({ restore, current, reload }) {

const translator = useTranslator();
const group = useUserGroup();
Expand Down Expand Up @@ -70,7 +70,7 @@ export function MetadataEditor ({ current, reload }) {
const resetBlock = blocking;
setBlocking(false);
setTimeout(() => {
history.push(path);
history.push(restore ? `../${path}/edit` : path);
setBlocking(resetBlock);
});
};
Expand All @@ -81,7 +81,7 @@ export function MetadataEditor ({ current, reload }) {

const warnings = definition.warnings && definition.warnings(metadata);

const canFilter = FilterableProviders.indexOf(definition.type) > -1;
const canFilter = restore ? false : FilterableProviders.indexOf(definition.type) > -1;

React.useEffect(() => {
dispatch(setFormDataAction(current));
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/metadata/view/MetadataRestore.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function MetadataRestore() {
...metadata,
version: latest.version
}}>
<MetadataEditor current={{
<MetadataEditor restore={true} current={{
...metadata,
version: latest.version
}} />
Expand Down

0 comments on commit 032a5bc

Please sign in to comment.