vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
445 stars 83 forks source link

Make it possible to save Grid settings to local storage #7655

Open mstahv opened 4 weeks ago

mstahv commented 4 weeks ago

Describe your motivation

For best possible UX many it would be good if the Grid settings like column widths, visibility and order, would be saved either automatically or by explicitly asking for it. The best place would be local storage as as a user I might oftent want different setting on different devices. Implementing this kind of features is currently diffucult and expensive for application developers.

Describe the solution you'd like

Grid should have a built-in feature that can save the current "grid settings" to local storage.

Describe alternatives you've considered

No response

Additional context

No response

rolfsmeds commented 4 weeks ago

This would be very nice to have.

Instead of simply storing the configuration in local storage, however, I would propose an API for getting a serialized string representing the config, so that you could store it elsewhere as well, e.g. the user profile table in your DB, a cookie, a QR code, or print it on a small note for carrier pigeon transport.

We actually have similar plans for the upcoming Dashboard component, that would provide an API for serializing the current dashboard configuration (widgets, positions, colspan, rowspan) for persisting in any way you like.