Dataviews: Filter icon is displayed even when no filter capabilities are given to any field #64631
Closed
2 tasks done
Labels
[Feature] DataViews
Work surrounding upgrading and evolving views in the site editor and beyond
[Package] DataViews
/packages/dataviews
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When no
elements
property is defined for any of the items passed in thefields
prop, the UI still shows the filter icon but displays an empty boxStep-by-step reproduction instructions
1- Clone https://github.com/WordPress/gutenberg/ repo and install dependencies
2- Edit
packages/dataviews/src/components/dataviews/stories/fixtures.js
and comment on anyelements
orfilterBy
properties passed in the items passed to thefields
props2- Run
npm run storybook:dev
3- Go to
/?path=/story/dataviews-dataviews--default
and check how the filter icon still appears and an empty box appearsThe expected behaviour here would be:
Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
cc: @oandregal
The text was updated successfully, but these errors were encountered: