Skip to content

Commit

Permalink
chore(html): add grid with filter menu template
Browse files Browse the repository at this point in the history
  • Loading branch information
epetrow committed Jan 29, 2024
1 parent 751a9be commit 28f6ff4
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/html/src/grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export * from './grid-pager.spec';
export * from './grid-toolbar.spec';
export * from './templates/grid-normal';
export * from './templates/grid-with-column-menu';
export * from './templates/grid-with-filter-menu';
69 changes: 69 additions & 0 deletions packages/html/src/grid/templates/grid-with-filter-menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { Grid, GridHeader, GridHeaderTable, GridHeaderCell, GridContainer, GridContent, GridTable, GridPager } from '../../grid';
import { TableThead, TableTbody, TableRow, TableTd } from '../../table';

export const GridWithFilterMenu = (props) => (
<Grid _renderAriaRoot
pager={( <GridPager refresh={false} /> )}
children={(
<>
<GridHeader>
<div className="k-grid-header-wrap">
<GridHeaderTable>
<colgroup>
<col />
<col />
<col />
</colgroup>
<TableThead>
<TableRow>
<GridHeaderCell rowspan={1} colspan={1} menu="filter" columnTitle="Name"></GridHeaderCell>
<GridHeaderCell rowspan={1} colspan={1} menu="filter" columnTitle="City"></GridHeaderCell>
<GridHeaderCell rowspan={1} colspan={1} menu="filter" columnTitle="Title"></GridHeaderCell>
</TableRow>
</TableThead>
</GridHeaderTable>
</div>
</GridHeader>
<GridContainer>
<GridContent className="k-virtual-content">
<GridTable>
<colgroup>
<col />
<col />
<col />
</colgroup>
<TableTbody>
<TableRow>
<TableTd>Michael Buchanan</TableTd>
<TableTd>Redmond</TableTd>
<TableTd>CEO</TableTd>
</TableRow>
<TableRow className="k-alt" alt>
<TableTd>Margaret Peacock</TableTd>
<TableTd>Tacoma</TableTd>
<TableTd>CTO</TableTd>
</TableRow>
<TableRow>
<TableTd>Margaret Suyama</TableTd>
<TableTd>Boston</TableTd>
<TableTd>Web Designer</TableTd>
</TableRow>
<TableRow className="k-alt" alt>
<TableTd>Laura Peacock</TableTd>
<TableTd>Seattle</TableTd>
<TableTd>Accountant</TableTd>
</TableRow>
<TableRow>
<TableTd>Janet Davolio</TableTd>
<TableTd>Philadelphia</TableTd>
<TableTd>Sales Manager</TableTd>
</TableRow>
</TableTbody>
</GridTable>
</GridContent>
</GridContainer>
</>
)}
{...props}>
</Grid>
);

0 comments on commit 28f6ff4

Please sign in to comment.