Data
TwColumnFilterEditor
TwColumnFilterEditor edits a column filter of one or two conditions, such as is greater than 100, the same filter TwDataTable and TwSpreadsheet use.
Last updated
Basic usage
The editor changes a
ColumnFilter in place: two conditions, each a comparison and a value, joined by And or Or. It is the filter TwDataTable and the table filters of TwSpreadsheet show, so you can build your own filter UI with the same conditions, for example in a side panel. ColumnFilter.Matches tests a value with the same rules those components use. A condition with no value is ignored, so a new filter lets everything through.- Ada Lovelace
- Alan Turing
- Grace Hopper
- Katherine Johnson
- Linus Torvalds
- Margaret Hamilton
Numbers, dates and choices
Type picks the comparisons offered and the field the value is typed into: FilterType.Number offers comparisons such as "is greater than" with a number field, FilterType.Date a date field, and FilterType.Boolean Yes and No. For FilterType.Enum, pass the values to choose from as Choices. Values are kept in one format whatever the culture: numbers with a . and dates as yyyy-MM-dd.- ¤24.00
- ¤39.99
- ¤120.00
Choosing the comparisons
Operators lists the comparisons to offer, in order, in place of the ones that suit the type. The first one is where a new condition starts.Matches "Shipped": True
Accessibility
- Every field has a visible label: first condition, first value, second condition and second value.
- The And and Or buttons sit in a labelled group and say which one is chosen with
aria-pressed. - The fields are the library's own select, numeric and text fields, so they work the same as anywhere else.
- All of the editor's text is translated into the app's language.