From 0c5e68cddfb03ee5da0e819260c1c98bc557b036 Mon Sep 17 00:00:00 2001 From: Micaela Goffe Date: Thu, 12 Dec 2024 11:35:11 +0100 Subject: [PATCH] fix(footer): remove unused logic for setting max toolbar items --- 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, }), }; };