Skip to content

DataViews - layout icon still shows with 1 layout, with empty context menu #64359

@Zealth57

Description

@Zealth57

Description

When using the new dataviews component, if you try to set the 'view' to only have 1, the icon still shows up. When you click the icon, the exposed context menu is blank. If you only have 1 view, that icon should automatically be hidden.

Step-by-step reproduction instructions

  • create a dataview table
  • only set 'table' as a view, don't allow grid or any other views.
  • observe that the view change icon is still visible but clicking it does effectively nothing.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] DataViews/packages/dataviews[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions