Skip to content

Commit

Permalink
fix(data-grid): fix search for hidden columns
Browse files Browse the repository at this point in the history
  • Loading branch information
tran-christian committed Aug 25, 2024
1 parent c4af2d5 commit 0df08a0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Home: NextPage<HomePageProps> = ({ allCourseData }) => {
const theme = useTheme();

const courses = coursesArray.map((data, i) => ({ ...data, id: i }));

const columns: GridColDef[] = [
{
field: courseFields.NAME,
Expand Down Expand Up @@ -100,15 +100,12 @@ const Home: NextPage<HomePageProps> = ({ allCourseData }) => {
{
field: courseFields.IS_DEPRECATED,
headerName: 'is Deprecated?',
flex: 0,
hideable: true,
type: 'boolean',
},
{
field: courseFields.ALIASES,
headerName: 'Aliases',
flex: 0,
hideable: true,
flex: isDesktop ? 1 : 0,
},
];
return (
Expand Down Expand Up @@ -137,7 +134,6 @@ const Home: NextPage<HomePageProps> = ({ allCourseData }) => {
>
<DataGrid
autoHeight
disableColumnSelector
rows={courses}
columns={columns}
loading={!allCourseData}
Expand Down Expand Up @@ -165,6 +161,12 @@ const Home: NextPage<HomePageProps> = ({ allCourseData }) => {
pageSize: 100,
},
},
filter: {
filterModel: {
items: [],
quickFilterExcludeHiddenColumns: false,
},
},
}}
/>
</Grid>
Expand Down

0 comments on commit 0df08a0

Please sign in to comment.