vaadin / vaadin/framework

Turn off Grid's cell focus feature

Open
#7,667 10 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement workaround
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Originally by phansson


For some grids, in particular read-only grids or grids that doesn't allow selection (SelectionMode.NONE), the cell focus feature is misleading for users. There should be a possibility to turn off the cell focus feature.

By cell focus I mean the CSS classname v-grid-cell-focused. Because of the way this is implemented in the CSS there isn't a good way to revert what v-grid-cell-focused does from CSS itself. Therefore a server-side feature is needed where cell focus can be turned off, similar to turning off selection feature on the grid.


Imported from https://dev.vaadin.com/ issue #19842

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the grid's server-side selection implementation and the code that applies the v-grid-cell-focused CSS class, using SelectionMode.NONE as the related behavior. Add a comparable way to disable cell focus, then verify that disabled focus no longer applies the cell-focused styling while existing selection behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.