mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
parent
1462b2ee9c
commit
2df7b92269
9 changed files with 218 additions and 25 deletions
|
@ -464,6 +464,22 @@ title="Load balancers" description="Your organization's active load balancers."
|
|||
</Toolbar>
|
||||
</DataTable>
|
||||
|
||||
### Filterable
|
||||
|
||||
By default, `ToolbarSearch` will not filter `DataTable` rows.
|
||||
|
||||
Set `shouldFilterRows` to `true` to enable client-side filtering. The default filtering performs a basic string comparison on cell values that are of a string or a number type.
|
||||
|
||||
Note that in-memory filtering is not optimal for large data sets, where you might consider using server-side search.
|
||||
|
||||
<FileSource src="/framed/DataTable/DataTableFilterable" />
|
||||
|
||||
### Filterable (custom)
|
||||
|
||||
`shouldFilterRows` also accepts a function and passes it the current row and value. It expects the function to return a boolean.
|
||||
|
||||
<FileSource src="/framed/DataTable/DataTableFilterCustom" />
|
||||
|
||||
### Zebra stripes
|
||||
|
||||
<DataTable zebra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue