-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(html): add grid with filter row template
- Loading branch information
Showing
2 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149 changes: 149 additions & 0 deletions
149
packages/html/src/grid/templates/grid-with-filter-row.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
import { Grid, GridHeader, GridContainer, GridContent, GridHeaderTable, GridHeaderCell, GridTable, GridPager } from '../../grid'; | ||
import { TableTh, TableTd, TableThead, TableRow, TableTbody } from '../../table'; | ||
import { Button } from '../../button'; | ||
import { DropdownList } from '../../dropdownlist'; | ||
import { NumericTextbox } from '../../numerictextbox'; | ||
import { Textbox } from '../../textbox'; | ||
|
||
export const GridWithFilterRow = (props) => ( | ||
<Grid _renderAriaRoot | ||
pager={( <GridPager refresh={false} /> )} | ||
children={( | ||
<> | ||
<GridHeader> | ||
<div className="k-grid-header-wrap"> | ||
<GridHeaderTable> | ||
<colgroup> | ||
<col /> | ||
<col /> | ||
<col /> | ||
<col /> | ||
<col /> | ||
</colgroup> | ||
<TableThead> | ||
<TableRow> | ||
<GridHeaderCell rowspan={1} colspan={1} columnTitle="Product Id"></GridHeaderCell> | ||
<GridHeaderCell rowspan={1} colspan={1} columnTitle="Name"></GridHeaderCell> | ||
<GridHeaderCell rowspan={1} colspan={1} columnTitle="Quantity"></GridHeaderCell> | ||
<GridHeaderCell rowspan={1} colspan={1} columnTitle="Unit Price"></GridHeaderCell> | ||
<GridHeaderCell rowspan={1} colspan={1} columnTitle="Discontinued"></GridHeaderCell> | ||
</TableRow> | ||
<TableRow className="k-filter-row"> | ||
<TableTh> | ||
<div className="k-filtercell"> | ||
<div className="k-filtercell-wrapper"> | ||
<NumericTextbox /> | ||
<div className="k-filtercell-operator"> | ||
<DropdownList className="k-dropdown-operator" arrowIconName="filter" /> | ||
{' '} | ||
<Button icon="filter-clear"></Button> | ||
</div> | ||
</div> | ||
</div> | ||
</TableTh> | ||
<TableTh> | ||
<div className="k-filtercell"> | ||
<div className="k-filtercell-wrapper"> | ||
<Textbox /> | ||
<div className="k-filtercell-operator"> | ||
<DropdownList className="k-dropdown-operator" arrowIconName="filter" /> | ||
{' '} | ||
<Button icon="filter-clear"></Button> | ||
</div> | ||
</div> | ||
</div> | ||
</TableTh> | ||
<TableTh> | ||
<div className="k-filtercell"> | ||
<div className="k-filtercell-wrapper"> | ||
<Textbox /> | ||
<div className="k-filtercell-operator"> | ||
<DropdownList className="k-dropdown-operator" arrowIconName="filter" /> | ||
{' '} | ||
<Button icon="filter-clear"></Button> | ||
</div> | ||
</div> | ||
</div> | ||
</TableTh> | ||
<TableTh> | ||
<div className="k-filtercell"> | ||
<div className="k-filtercell-wrapper"> | ||
<NumericTextbox /> | ||
<div className="k-filtercell-operator"> | ||
<DropdownList className="k-dropdown-operator" arrowIconName="filter" /> | ||
{' '} | ||
<Button icon="filter-clear"></Button> | ||
</div> | ||
</div> | ||
</div> | ||
</TableTh> | ||
<TableTh> | ||
<div className="k-filtercell"> | ||
<div className="k-filtercell-wrapper"> | ||
<DropdownList /> | ||
<div className="k-filtercell-operator"> | ||
<Button icon="filter-clear"></Button> | ||
</div> | ||
</div> | ||
</div> | ||
</TableTh> | ||
</TableRow> | ||
</TableThead> | ||
</GridHeaderTable> | ||
</div> | ||
</GridHeader> | ||
<GridContainer> | ||
<GridContent className="k-virtual-content"> | ||
<GridTable> | ||
<colgroup> | ||
<col /> | ||
<col /> | ||
<col /> | ||
<col /> | ||
<col /> | ||
</colgroup> | ||
<TableTbody> | ||
<TableRow> | ||
<TableTd>1</TableTd> | ||
<TableTd>Chai</TableTd> | ||
<TableTd>10 boxes x 20 bags</TableTd> | ||
<TableTd>18</TableTd> | ||
<TableTd>false</TableTd> | ||
</TableRow> | ||
<TableRow className="k-alt" alt> | ||
<TableTd>2</TableTd> | ||
<TableTd>Chang</TableTd> | ||
<TableTd>24 - 12 oz bottles</TableTd> | ||
<TableTd>19</TableTd> | ||
<TableTd>false</TableTd> | ||
</TableRow> | ||
<TableRow> | ||
<TableTd>3</TableTd> | ||
<TableTd>Aniseed Syrup</TableTd> | ||
<TableTd>12 - 550 ml bottles</TableTd> | ||
<TableTd>10</TableTd> | ||
<TableTd>false</TableTd> | ||
</TableRow> | ||
<TableRow className="k-alt" alt> | ||
<TableTd>4</TableTd> | ||
<TableTd>Chef Anton's Cajun Seasoning</TableTd> | ||
<TableTd>48 - 6 oz jars</TableTd> | ||
<TableTd>22</TableTd> | ||
<TableTd>false</TableTd> | ||
</TableRow> | ||
<TableRow> | ||
<TableTd>5</TableTd> | ||
<TableTd>Grandma's Boysenberry Spread</TableTd> | ||
<TableTd>12 - 8 oz jars</TableTd> | ||
<TableTd>25</TableTd> | ||
<TableTd>false</TableTd> | ||
</TableRow> | ||
</TableTbody> | ||
</GridTable> | ||
</GridContent> | ||
</GridContainer> | ||
</> | ||
)} | ||
{...props} | ||
></Grid> | ||
); |