Skip to content

Column selector is hard to reach when the grid has many columns #177

Description

@Totremont

Feature proposal

When a grid has more columns than fit on screen, the ⋮ button that lets you hide columns ends up off screen too — you have to scroll all the way to the right, through the data, to get to it.

It feels backwards. That button is there to help me deal with having too many columns, and having too many columns is the one thing that hides it. Every time I want to tidy up the grid I first have to go looking for the control that does the tidying.

It also means that if I don't already know the button is there, nothing on screen tells me the columns can be hidden at all. I'd have to scroll sideways for no reason and happen to find it.

And a smaller thing: the button's column leaves an empty strip running down the whole table, which just looks like something is missing.

Describe solution expectations

What would help is being able to put that button somewhere that stays put when I scroll sideways. A small toolbar above the grid seems like the natural spot, and it's where plenty of other grids keep this kind of control.

I realise that isn't free. Today the add-on doesn't add anything above the grid, and I assume that's on purpose — it keeps the grid looking like a plain Vaadin grid. Having a toolbar show up just because you enabled the column toggle could be unwelcome for people who don't want it.

So maybe it shouldn't be the default, but an option: a toolbar above the grid that you can turn on — useful on its own for other grid-level controls — plus a setting to render the column selector into it instead of into a column. Anyone who likes the current behaviour keeps it.

The footer toolbar that already exists would be a cheaper home, but it seems like a worse one: it's easy to miss, it can end up below the fold, and it's far from the headers it actually changes.

One small extra: a bare ⋮ usually means "more actions". Calling it Columns, or using a columns icon, would make it much easier to recognise for what it is.

Either way, it seems worth thinking about — right now the control is least reachable in exactly the situation it was built for.

Additional information

Related: #176 — the same button also disappears from the header completely after hiding a column.

Observed with add-on 2.1.0 on Vaadin 25.2.3.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions