diff --git a/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts b/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts index b3bee519040b..238482e5ab10 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/export/m_export.ts @@ -886,10 +886,6 @@ const headerPanel = (Base: ModuleType) => class ExportHeaderPanelEx this.setToolbarItemDisabled('exportButton', disabled); }); } - - public isVisible() { - return super.isVisible() || this._isExportButtonVisible(); - } }; dataGridCore.registerModule('export', { diff --git a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts index 921272af50c6..ce320c762b3d 100644 --- a/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts +++ b/packages/devextreme/js/__internal/grids/data_grid/grouping/m_grouping.ts @@ -584,10 +584,6 @@ export const GroupingHeaderPanelExtender = (Base: ModuleType) => cl return items; } - public isVisible() { - return super.isVisible() || this._isGroupPanelVisible(); - } - public hasGroupedColumns(): boolean { return this._isGroupPanelVisible() && !!this.getColumns().length; } diff --git a/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts b/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts index e36d2a2cb89d..dcf090f37bbd 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/column_chooser/m_column_chooser.ts @@ -579,13 +579,6 @@ const headerPanel = (Base: ModuleType) => class ColumnChooserHeader super.optionChanged(args); } } - - public isVisible() { - const that = this; - const columnChooserEnabled = that.option('columnChooser.enabled')!; - - return super.isVisible() || columnChooserEnabled; - } }; const columns = (Base: ModuleType) => class ColumnsChooserColumnsControllerExtender extends Base { diff --git a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts index 1e6fcbf1f082..22df69404467 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing.ts @@ -2873,13 +2873,6 @@ const headerPanel = (Base: ModuleType) => class HeaderPanelEditingE return editButtonItems.concat(items); } - - public isVisible() { - const editingOptions = this._editingController.option('editing'); - - // @ts-expect-error - return super.isVisible() || editingOptions?.allowAdding; - } }; export const editingModule = { diff --git a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts index f6a407840b87..35ffc9039bc7 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/editing/m_editing_cell_based.ts @@ -12,7 +12,6 @@ import type { DeferredObj } from '@js/core/utils/deferred'; import { Deferred, when } from '@js/core/utils/deferred'; import { isElementInDom } from '@js/core/utils/dom'; import { isDefined, isString } from '@js/core/utils/type'; -import type { HeaderPanel } from '@ts/grids/grid_core/header_panel/m_header_panel'; import type { RowsView } from '@ts/grids/grid_core/views/m_rows_view'; import type { ModuleType } from '../m_types'; @@ -721,15 +720,6 @@ const rowsView = (Base: ModuleType) => class RowsViewEditingCellBasedE } }; -const headerPanel = (Base: ModuleType) => class HeaderPanelEditingCellBasedExtender extends Base { - public isVisible() { - const editingOptions = this._editingController.option('editing'); - - // @ts-expect-error - return super.isVisible() || editingOptions && (editingOptions.allowUpdating || editingOptions.allowDeleting) && editingOptions.mode === EDIT_MODE_BATCH; - } -}; - export const editingCellBasedModule = { extenders: { controllers: { @@ -737,7 +727,6 @@ export const editingCellBasedModule = { }, views: { rowsView, - headerPanel, }, }, }; diff --git a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts index 496779c3de95..8bd2dce6eae5 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/filter/m_filter_row.ts @@ -1013,10 +1013,6 @@ const headerPanel = (Base: ModuleType) => class FilterRowHeaderPane private enableApplyButton(value) { this.setToolbarItemDisabled('applyFilterButton', !value); } - - public isVisible() { - return super.isVisible() || this._isShowApplyFilterButton(); - } }; export const filterRowModule = { diff --git a/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts b/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts index b89733dfe7f3..c4682b9c663d 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts @@ -214,8 +214,7 @@ export class HeaderPanel extends ColumnsView { } else if (parts[1] === 'items') { if (parts.length === 2) { // `toolbar.items` case - const toolbarOptions = this._getToolbarOptions(); - this._toolbar?.option('items', toolbarOptions.items); + this._invalidate(); } else if (parts.length === 3) { // `toolbar.items[i]` case const normalizedItem = this._normalizeToolbarItems(this._getToolbarItems(), args.value); diff --git a/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts b/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts index bf39e10ba154..39d39f9d65d9 100644 --- a/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts +++ b/packages/devextreme/js/__internal/grids/grid_core/search/m_search.ts @@ -193,11 +193,6 @@ const headerPanel = ( } return null; } - - public isVisible() { - const searchPanelOptions = this.option('searchPanel'); - return super.isVisible() || !!searchPanelOptions?.visible; - } }; const rowsView = ( diff --git a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js index e2000e8a5f9c..b9a9f6d52294 100644 --- a/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.ui.widgets.dataGrid/dataGrid.tests.js @@ -2879,7 +2879,7 @@ QUnit.module('Assign options', baseModuleConfig, () => { dataGrid.option('toolbar.visible', false); // assert - assert.ok($toolbar.hasClass('dx-state-invisible'), 'toolbar is hidden'); + assert.ok($toolbar.parent().hasClass('dx-hidden'), 'toolbar is hidden'); // act dataGrid.option('toolbar.disabled', true);