Skip to content
New issue

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

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

Already on GitHub? # to your account

[grid] Add disabled property #2170

Closed
rolfsmeds opened this issue Jun 30, 2021 · 2 comments · Fixed by #3445 or vaadin/vaadin-grid#2211
Closed

[grid] Add disabled property #2170

rolfsmeds opened this issue Jun 30, 2021 · 2 comments · Fixed by #3445 or vaadin/vaadin-grid#2211
Labels
enhancement New feature or request needs design Design is needed vaadin-grid

Comments

@rolfsmeds
Copy link
Contributor

Describe your motivation

vaadin-grid does not have a disabled state, even though the Flow API has setEnabled (which disabled some, but not all, interaction). While somewhat niche, there are situations in which it's desirable to disable all interaction with a Grid, such as in a master-detail layout where you wish to prevent the user from interacting with the master grid while an item is being edited in the details.

Describe the solution you'd like

Not sure what a disabled Grid should be like – UI and interaction design is needed – but here is some food for thought:

  • Lowered opacity? (like other disabled components)
  • Selection, editing, filtering, item details toggling, sorting should definitely be disabled.
  • Should focusing be disabled? (most components, and native html elements, are unfocusable when disabled)
  • Should scrolling be disabled? (yes if focusing is disabled)
@rolfsmeds rolfsmeds added enhancement New feature or request vaadin-grid needs design Design is needed labels Jun 30, 2021
@web-padawan web-padawan changed the title Disabled state for Grid [grid] Add disabled property Jul 6, 2021
@mlindfors
Copy link

Just noting here that if the vaadin-grid is disabled, then also the possible vaadin-grid-tree-toggle elements need to be disabled. At the moment the behaviour is erratic:

  • the toggle is clickable
  • a collapsed node will not expand, but an expanded node will collapse on click
  • the toggle visually changes state when clicked i.e. the arrow direction changes and all that

@tomivirkki
Copy link
Member

tomivirkki commented Dec 13, 2021

@mlindfors Note that this issue is about the <vaadin-grid> Web Component.

At the moment the behaviour is erratic

At the moment, <vaadin-grid disabled> doesn't affect anything.

You're referring to the Flow (Tree)Grid which shouldn't have the API for disabling the component in the first place (because this feature hasn't yet been implemented). You can find related issue reports at https://github.com/vaadin/flow-components/issues?q=is%3Aissue+is%3Aopen+grid+setEnabled+

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request needs design Design is needed vaadin-grid
Projects
None yet
3 participants