You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/dataviews/README.md
+44-29Lines changed: 44 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1705,7 +1705,7 @@ Configuration of the filters. Set to `false` to opt the field out of filtering
1705
1705
- Optional.
1706
1706
- If `false`, the field will not be available for filtering.
1707
1707
- If an object, it can have the following properties:
1708
-
- `operators`: the list of operators supported by the field. See "operators" below. A filter will support the `isAny` and `isNone` multi-selection operators by default.
1708
+
- `operators`: the list of operators supported by the field. See "operators" below.
1709
1709
- `isPrimary`: boolean, optional. Indicates if the filter is primary. A primary filter is always visible and is not listed in the "Add filter" component, except for the list layout where it behaves like a secondary filter.
1710
1710
1711
1711
By default, fields have filtering enabled by using the field's `Edit` function:
@@ -1798,34 +1798,49 @@ Or multi-selection operators:
| `is` | Single item | `EQUALTO`. The item's field is equal to a single value. | Author is Admin |
1804
-
| `isNot` | Single item | `NOTEQUALTO`. The item's field is not equal to a single value. | Author is not Admin |
1805
-
| `isAny` | Multiple items | `OR`. The item's field is present in a list of values. | Author is any: Admin, Editor |
1806
-
| `isNone` | Multiple items | `NOTOR`. The item's field is not present in a list of values. | Author is none: Admin, Editor |
1807
-
| `isAll` | Multiple items | `AND`. The item's field has all of the values in the list. | Category is all: Book, Review, Science Fiction |
1808
-
| `isNotAll` | Multiple items | `NOTAND`. The item's field doesn't have all of the values in the list. | Category is not all: Book, Review, Science Fiction |
1809
-
| `lessThan` | Single item | `LESSTHAN`. The item's field is numerically less than a single value. | Age is less than 18 |
1810
-
| `greaterThan` | Single item | `GREATERTHAN`. The item's field is numerically greater than a single value. | Age is greater than 65 |
1811
-
| `lessThanOrEqual` | Single item | `LESSTHANOREQUALTO`. The item's field is numerically less than or equal to a single value. | Age is less than or equal to 18 |
1812
-
| `greaterThanOrEqual` | Single item | `GREATERTHANOREQUALTO`. The item's field is numerically greater than or equal to a single value. | Age is greater than or equal to 65 |
1813
-
| `contains` | Text | `CONTAINS`. The item's field contains the given substring. | Title contains: Mars |
1814
-
| `notContains` | Text | `NOTCONTAINS`. The item's field does not contain the given substring. | Description doesn't contain: photo |
1815
-
| `startsWith` | Text | `STARTSWITH`. The item's field starts with the given substring. | Title starts with: Mar |
1816
-
| `on` | Date | `ON`. The item's field is on a given date (date equality using proper date parsing). | Date is on: 2024-01-01 |
1817
-
| `notOn` | Date | `NOTON`. The item's field is not on a given date (date inequality using proper date parsing). | Date is not on: 2024-01-01 |
1818
-
| `before` | Date | `BEFORE`. The item's field is before a given date. | Date is before 2024-01-01 |
1819
-
| `after` | Date | `AFTER`. The item's field is after a given date. | Date is after 2024-01-01 |
1820
-
| `beforeInc` | Date | `BEFORE (Inc)`. The item's field is before a given date, including the date. | Date is before 2024-01-01, including 2024-01-01 |
1821
-
| `afterInc` | Date | `AFTER (Inc)`. The item's field is after a given date, including the date. | Date is after 2024-01-01, including 2024-01-01 |
1822
-
| `inThePast` | Date | `INTHEPAST`. The item's field is within the last N units (days, weeks, months, or years) from now. | Orders placed in the past 7 days |
1823
-
| `over` | Date | `OVER`. The item's field is older than N units (days, weeks, months, or years) from now. | Orders placed over 7 days ago |
1824
-
| `between` | Multiple items | `BETWEEN`. The item's field is between two values. | Item count between (inc): 10-180 |
1825
-
1826
-
`is`, `isNot`, `on`, `notOn`, `lessThan`, `greaterThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `beforeInc`, `afterInc`, `contains`, `notContains`, and `startsWith` are single-selection operators, while `isAny`, `isNone`, `isAll`, and `isNotAll` are multi-selection. `between` is a special operator that requires two values and it's not supported for preset layout. A filter with no operators declared will support the `isAny` and `isNone` multi-selection operators by default. A filter cannot mix single-selection & multi-selection operators; if a single-selection operator is present in the list of valid operators, the multi-selection ones will be discarded, and the filter won't allow selecting more than one item.
| `after` | `AFTER`. The item's field is after a given date. | Date is after: 2024-01-01 |
1804
+
| `afterInc` | `AFTER (Inc)`. The item's field is after a given date, including the date. | Date is on or after: 2024-01-01 |
1805
+
| `before` | `BEFORE`. The item's field is before a given date. | Date is before: 2024-01-01 |
1806
+
| `beforeInc` | `BEFORE (Inc)`. The item's field is before a given date, including the date. | Date is on or before: 2024-01-01 |
1807
+
| `between` | `BETWEEN`. The item's field is between two values. | Count between (inc): 10 and 180 |
1808
+
| `contains` | `CONTAINS`. The item's field contains the given substring. | Title contains: Mars |
1809
+
| `greaterThan` | `GREATERTHAN`. The item's field is numerically greater than a single value. | Age is greater than: 65 |
1810
+
| `greaterThanOrEqual` | `GREATERTHANOREQUALTO`. The item's field is numerically greater than or equal to a single value. | Age is greater than or equal to: 65 |
1811
+
| `inThePast` | `INTHEPAST`. The item's field is within the last N units (days, weeks, months, or years) from now. | Orders in the past: 7 days |
1812
+
| `isAll` | `AND`. The item's field has all of the values in the list. | Category is all: Book, Review, Science Fiction |
1813
+
| `isAny` | `OR`. The item's field is present in a list of values. | Author is any: Admin, Editor |
1814
+
| `isNone` | `NOTOR`. The item's field is not present in a list of values. | Author is none: Admin, Editor |
1815
+
| `isNot` | `NOTEQUALTO`. The item's field is not equal to a single value. | Author is not Admin |
1816
+
| `isNotAll` | `NOTAND`. The item's field doesn't have all of the values in the list. | Category is not all: Book, Review, Science Fiction |
1817
+
| `is` | `EQUALTO`. The item's field is equal to a single value. | Author is: Admin |
1818
+
| `lessThan` | `LESSTHAN`. The item's field is numerically less than a single value. | Age is less than: 18 |
1819
+
| `lessThanOrEqual` | `LESSTHANOREQUALTO`. The item's field is numerically less than or equal to a single value. | Age is less than or equal to: 18 |
1820
+
| `notContains` | `NOTCONTAINS`. The item's field does not contain the given substring. | Description doesn't contain: photo |
1821
+
| `notOn` | `NOTON`. The item's field is not on a given date (date inequality using proper date parsing). | Date is not: 2024-01-01 |
1822
+
| `on` | `ON`. The item's field is on a given date (date equality using proper date parsing). | Date is: 2024-01-01 |
1823
+
| `over` | `OVER`. The item's field is older than N units (days, weeks, months, or years) from now. | Orders over: 7 days ago |
1824
+
| `startsWith` | `STARTSWITH`. The item's field starts with the given substring. | Title starts with: Mar |
1825
+
1826
+
Some operators are single-selection: `is`, `isNot`, `on`, `notOn`, `lessThan`, `greaterThan`, `lessThanOrEqual`, `greaterThanOrEqual`, `before`, `after`, `beforeInc`, `afterInc`, `contains`, `notContains`, and `startsWith`. Others are multi-selection: `isAny`, `isNone`, `isAll`, and `isNotAll`. A filter cannot mix single-selection & multi-selection operators; if a single-selection operator is present in the list of valid operators, the multi-selection ones will be discarded, and the filter won't allow selecting more than one item.
0 commit comments