Skip to content

DataToolbarFilter: categoryName label required to delete chips #3552

@dlabrecq

Description

@dlabrecq

The categoryName prop of DataToolbarFilter is used to display the category name in the chip. In the example below, the "Project" category (i.e., chip) is a localizable string.

Screen Shot 2020-01-22 at 8 13 49 PM

When the chip is deleted, the same string is provided as the type variable to callback.

Screen Shot 2020-01-22 at 8 15 31 PM

In the filterable table demo below, the type is converted using toLowerCase(). However, considering that this is a localizable label, we cannot use that approach to store filter values an array.

Screen Shot 2020-01-22 at 8 26 54 PM

I don't want the localizable "Project" label here, but some ID (e.g., 'project'). (All my filter and menu options are based on IDs.) Perhaps a categoryID prop would be helpful here?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions