diff --git a/package.json b/package.json index 9596c224..94e7c3ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/netdata-ui", - "version": "5.5.9", + "version": "5.5.10", "description": "netdata UI kit", "main": "dist/index.js", "module": "dist/es6/index.js", diff --git a/src/components/table/components/action.js b/src/components/table/components/action.js index 19afdc9f..d298d185 100644 --- a/src/components/table/components/action.js +++ b/src/components/table/components/action.js @@ -35,7 +35,6 @@ const Action = ({ ...rest }) => { const [isConfirmationOpen, setConfirmationOpen] = useState(false) - if (visible === false) return null const onActionClicked = e => { e.stopPropagation() @@ -93,6 +92,8 @@ const Action = ({ ] ) + if (visible === false) return null + return ( <> {isConfirmationOpen && CustomUIAction && ( diff --git a/src/components/table/useColumns/useRowActions.js b/src/components/table/useColumns/useRowActions.js index 34ea5f1f..d2772179 100644 --- a/src/components/table/useColumns/useRowActions.js +++ b/src/components/table/useColumns/useRowActions.js @@ -62,10 +62,10 @@ export default (rowActions, { testPrefix, tableMeta } = {}) => { [rowActions] ) - if (availableRowActions.length < 1) return null + return useMemo(() => { + if (availableRowActions.length < 1) return null - return useMemo( - () => ({ + return { id: "actions", enableResizing: false, header: "Actions", @@ -124,7 +124,6 @@ export default (rowActions, { testPrefix, tableMeta } = {}) => { justifyContent: "end", }, }, - }), - [availableRowActions] - ) + } + }, [availableRowActions]) }