Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid/TreeList - Sticky Columns: Adapt the editing and filter row features #28185

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix background for fixed cells in filter row (for fluent and material…
… themes)
  • Loading branch information
Alyar committed Oct 17, 2024
commit 8164d520968b7b7ae438c90d60073d18b9b5b7e8
Original file line number Diff line number Diff line change
@@ -4,30 +4,41 @@ import { safeSizeTest } from '../../../helpers/safeSizeTest';
import { createWidget } from '../../../helpers/createWidget';
import url from '../../../helpers/getPageUrl';
import { defaultConfig } from './data';
import { changeTheme } from '../../../helpers/changeTheme';
import { Themes } from '../../../helpers/themes';

const DATA_GRID_SELECTOR = '#container';

fixture.disablePageReloads`Sticky columns - Filter row`
.page(url(__dirname, '../../container.html'));

safeSizeTest('Filter row with sticky columns', async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);

await t.click(dataGrid.getHeaders().getFilterRow().getFilterCell(1).element);

await takeScreenshot('filter_row_with_sticky_columns_1.png', dataGrid.element);

await dataGrid.scrollTo(t, { x: 10000 });

await takeScreenshot('filter_row_with_sticky_columns_2.png', dataGrid.element);

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}, [800, 800]).before(async () => createWidget('dxDataGrid', {
...defaultConfig,
filterRow: {
visible: true,
},
}));
[Themes.genericLight, Themes.materialBlue, Themes.fluentBlue].forEach((theme) => {
safeSizeTest(`Filter row with sticky columns (${theme} theme)`, async (t) => {
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);

await t.click(dataGrid.getHeaders().getFilterRow().getFilterCell(1).element);

await takeScreenshot(`filter_row_with_sticky_columns_1_(${theme}).png`, dataGrid.element);

await dataGrid.scrollTo(t, { x: 10000 });

await takeScreenshot(`filter_row_with_sticky_columns_2_(${theme}).png`, dataGrid.element);

await t
.expect(compareResults.isValid())
.ok(compareResults.errorMessages());
}, [800, 800])
.before(async () => {
await changeTheme(theme);
await createWidget('dxDataGrid', {
...defaultConfig,
filterRow: {
visible: true,
},
});
})
.after(async () => {
await changeTheme(Themes.genericLight);
});
});
10 changes: 10 additions & 0 deletions packages/devextreme-scss/scss/widgets/fluent/gridBase/_index.scss
Original file line number Diff line number Diff line change
@@ -751,6 +751,16 @@ $fluent-grid-base-group-panel-message-line-height: $fluent-button-text-line-heig
}
}
}

&.dx-#{$widget-name}-sticky-columns {
.dx-#{$widget-name}-filter-row > td {
&.dx-#{$widget-name}-sticky-column,
&.dx-#{$widget-name}-sticky-column-left,
&.dx-#{$widget-name}-sticky-column-right {
background-color: $datagrid-filter-row-background-color;
}
}
}
}

.dx-#{$widget-name}-filter-row {
Original file line number Diff line number Diff line change
@@ -724,6 +724,16 @@ $material-grid-base-group-panel-message-line-height: $material-button-text-line-
}
}
}

&.dx-#{$widget-name}-sticky-columns {
.dx-#{$widget-name}-filter-row > td {
&.dx-#{$widget-name}-sticky-column,
&.dx-#{$widget-name}-sticky-column-left,
&.dx-#{$widget-name}-sticky-column-right {
background-color: $datagrid-filter-row-background-color;
}
}
}
}

.dx-#{$widget-name}-filter-row {
Loading