Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataViews: document enableSorting and enableHiding #55988

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/edit-site/src/components/dataviews/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ Example:
return (
<time>{ getFormattedDate( item.date ) }</time>
);
}
},
enableHiding: false
},
{
id: 'author',
Expand All @@ -161,6 +162,7 @@ Example:
{ value: 2, label: 'User' }
]
filters: [ 'in' ],
enableSorting: false
}
]
```
Expand All @@ -171,6 +173,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

Expand Down
Loading