Skip to content

Commit

Permalink
DataViews: document enableSorting and enableHiding (#55988)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal authored Nov 9, 2023
1 parent 09c50a2 commit e726f25
Showing 1 changed file with 5 additions and 1 deletion.
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

1 comment on commit e726f25

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in e726f25.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6811008507
📝 Reported issues:

Please sign in to comment.