From 803efb59319a3076c72a9e02810260dc55eb4e5a Mon Sep 17 00:00:00 2001 From: Micaela <162109598+micaelagoffe@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:13:48 +0100 Subject: [PATCH] fix(footer): remove unused logic for setting max toolbar items (#636) Remove unused logic for setting max toolbar items, controlling this from cosmoz-bottom-bar instead (PR#166) AB#17737 --- lib/render-footer.js | 3 --- lib/use-footer.js | 2 -- lib/use-omnitable.js | 3 --- 3 files changed, 8 deletions(-) diff --git a/lib/render-footer.js b/lib/render-footer.js index d84ecbb8..b54586bf 100644 --- a/lib/render-footer.js +++ b/lib/render-footer.js @@ -4,7 +4,6 @@ import { saveAsCsvAction } from './save-as-csv-action'; import { saveAsXlsxAction } from './save-as-xlsx-action'; import { isEmpty } from '@neovici/cosmoz-utils/template'; -// eslint-disable-next-line max-lines-per-function export const renderFooter = ({ columns, selectedItems, @@ -12,12 +11,10 @@ export const renderFooter = ({ xlsxFilename, xlsxSheetname, topPlacement, - maxToolbarItems, }) => html` ${ngettext( diff --git a/lib/use-footer.js b/lib/use-footer.js index 56dc19f1..04c3670f 100644 --- a/lib/use-footer.js +++ b/lib/use-footer.js @@ -7,7 +7,6 @@ export const useFooter = ({ host, ...rest }) => { xlsxFilename = 'omnitable.xlsx', xlsxSheetname = 'Omnitable', topPlacement = _defaultPlacement, - maxToolbarItems, } = host; return { @@ -15,7 +14,6 @@ export const useFooter = ({ host, ...rest }) => { xlsxFilename, xlsxSheetname, topPlacement, - maxToolbarItems, ...rest, }; }; diff --git a/lib/use-omnitable.js b/lib/use-omnitable.js index 218a594f..ba3954c9 100644 --- a/lib/use-omnitable.js +++ b/lib/use-omnitable.js @@ -8,7 +8,6 @@ import { useHeader } from './use-header'; import { useList } from './use-list'; import { useFooter } from './use-footer'; -// eslint-disable-next-line max-lines-per-function export const useOmnitable = (host) => { const { hashParam, @@ -48,7 +47,6 @@ export const useOmnitable = (host) => { resizeSpeedFactor, sortAndGroupOptions, }), - maxToolbarItems = isMini ? '0' : undefined, dataIsValid = data && Array.isArray(data) && data.length > 0, [selectedItems, setSelectedItems] = useState([]); @@ -96,7 +94,6 @@ export const useOmnitable = (host) => { host, selectedItems, columns, - maxToolbarItems, }), }; };