diff --git a/src/attributes/components/AttributePage/AttributePage.tsx b/src/attributes/components/AttributePage/AttributePage.tsx index 9fe12bdb0..2e4bb018a 100644 --- a/src/attributes/components/AttributePage/AttributePage.tsx +++ b/src/attributes/components/AttributePage/AttributePage.tsx @@ -136,7 +136,7 @@ const AttributePage: React.FC = ({ return (
- {({ change, data, submit }) => { + {({ change, data, hasChanged, submit }) => { const changeMetadata = makeMetadataChangeHandler(change); return ( @@ -185,7 +185,7 @@ const AttributePage: React.FC = ({ = props => { const scrollPosition = useWindowScroll(); const scrolledToBottom = scrollPosition.y + window.innerHeight >= document.body.scrollHeight; + const shouldDisplay = onDelete || !disabled; return ( {anchor => anchor ? ( -
- - - - {!!onDelete && ( + {shouldDisplay && ( +
+ + + + {!!onDelete && ( + + )} +
- )} -
- - - {maybe( - () => labels.save, - intl.formatMessage(buttonMessages.save) - )} - - - - -
+ + {maybe( + () => labels.save, + intl.formatMessage(buttonMessages.save) + )} + + + + +
+ )} ) : null } diff --git a/src/taxes/components/CountryListPage/CountryListPage.tsx b/src/taxes/components/CountryListPage/CountryListPage.tsx index 42680f1c7..1576ff4f6 100644 --- a/src/taxes/components/CountryListPage/CountryListPage.tsx +++ b/src/taxes/components/CountryListPage/CountryListPage.tsx @@ -47,7 +47,7 @@ const CountryListPage: React.FC = ({ }; return ( - {({ change, data, submit }) => ( + {({ change, data, hasChanged, submit }) => ( <> @@ -77,7 +77,7 @@ const CountryListPage: React.FC = ({