From b0b14665378d6f9ae69ded567fa4207ff4f63e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Maneiro?= <583546+oandregal@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:08:25 +0100 Subject: [PATCH 1/2] Document enableSorting & enableHiding --- packages/edit-site/src/components/dataviews/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/edit-site/src/components/dataviews/README.md b/packages/edit-site/src/components/dataviews/README.md index 7a5abc8ad485d..0dc5855d7741b 100644 --- a/packages/edit-site/src/components/dataviews/README.md +++ b/packages/edit-site/src/components/dataviews/README.md @@ -161,6 +161,7 @@ Example: { value: 2, label: 'User' } ] filters: [ 'in' ], + enableSorting: false } ] ``` @@ -171,6 +172,8 @@ Example: - `render`: function that renders the field. - `elements`: the set of valid values for the field's value. - `filters`: what filter operators are available for the user to use over this field. Only `in` available at the moment. +- `enableSorting`: whether the data can be sorted by the given field. True by default. +- `enableHiding`: whether the field can be hidden. True by default. ## Actions From 2093594b97787efa042de6ff381b869f1b2d8471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Maneiro?= <583546+oandregal@users.noreply.github.com> Date: Thu, 9 Nov 2023 11:10:22 +0100 Subject: [PATCH 2/2] Update example --- packages/edit-site/src/components/dataviews/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/dataviews/README.md b/packages/edit-site/src/components/dataviews/README.md index 0dc5855d7741b..ab077b2c6c30f 100644 --- a/packages/edit-site/src/components/dataviews/README.md +++ b/packages/edit-site/src/components/dataviews/README.md @@ -145,7 +145,8 @@ Example: return ( ); - } + }, + enableHiding: false }, { id: 'author',