Skip to content

Commit

Permalink
Run script
Browse files Browse the repository at this point in the history
  • Loading branch information
MBilalShafi committed Jan 13, 2025
1 parent 760b478 commit 585e71d
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import * as React from 'react';
import { DataGridPro } from '@mui/x-data-grid-pro';
import { useDemoData } from '@mui/x-data-grid-generator';

const VISIBLE_FIELDS = ['name', 'rating', 'website'];

export default function HeaderFilteringInlineClearDataGridPro() {
const { data, loading } = useDemoData({
dataSet: 'Employee',
rowLength: 100,
visibleFields: VISIBLE_FIELDS,
});

return (
Expand All @@ -15,10 +18,13 @@ export default function HeaderFilteringInlineClearDataGridPro() {
loading={loading}
initialState={{
...data.initialState,
columns: {
columnVisibilityModel: {
avatar: false,
id: false,
filter: {
filterModel: {
items: [
{ field: 'name', operator: 'contains', value: 'a' },
{ field: 'website', operator: 'contains', value: 'http://' },
{ field: 'rating', operator: '>', value: 2 },
],
},
},
}}
Expand Down

0 comments on commit 585e71d

Please sign in to comment.