diff --git a/CHANGELOG.md b/CHANGELOG.md index dce221cad..ad74362b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change history for ui-data-import +## [8.1.0] (IN PROGRESS) + +### Features added: +* `React v19`: refactor away from default props for functional components. (UIDATIMP-1634) + ## [8.0.2] (IN PROGRESS) ### Bugs fixed: diff --git a/src/settings/JobProfiles/ViewJobProfile/ViewJobProfile.js b/src/settings/JobProfiles/ViewJobProfile/ViewJobProfile.js index 48c445bf8..c1d5ce740 100644 --- a/src/settings/JobProfiles/ViewJobProfile/ViewJobProfile.js +++ b/src/settings/JobProfiles/ViewJobProfile/ViewJobProfile.js @@ -105,6 +105,12 @@ const jobPartsCellFormatter = record => ( /> ); +const DEFAULT_ACTION_ITEMS = [ + 'edit', + 'duplicate', + 'delete', +]; + const ViewJobProfileComponent = props => { const { resources, @@ -116,7 +122,7 @@ const ViewJobProfileComponent = props => { location, onDelete, onClose, - actionMenuItems, + actionMenuItems = DEFAULT_ACTION_ITEMS, accordionStatusRef, } = props; @@ -239,7 +245,11 @@ const ViewJobProfileComponent = props => { return ( setShowRunConfirmation(true), showDeleteConfirmation: () => setShowDeleteConfirmation(true), }} @@ -635,15 +645,6 @@ ViewJobProfileComponent.propTypes = { accordionStatusRef: PropTypes.object, }; -ViewJobProfileComponent.defaultProps = { - ENTITY_KEY: ENTITY_KEYS.JOB_PROFILES, - actionMenuItems: [ - 'edit', - 'duplicate', - 'delete', - ], -}; - export const ViewJobProfile = compose( stripesConnect, withTags,