-
-
Notifications
You must be signed in to change notification settings - Fork 73
Menu for hiding and showing columns #314
Comments
dash-table
: Menu for hiding and showing columns and for these preferences to be save-able [Sponsored: Due April 1]
Use local storage and revert to cookies if local storage is not available (the browser's configuration needs to be tested as some browsers / settings will mark the feature as available but allow 0 bytes to be saved). Session storage is useless here as it is not persisted between visits. Determine initialization model for table: Gets loaded with XYZ values for Storage must support multiple tables for a given path (use Implement internally as a standalone component for isolation and future flexibility. Use generic icon from some package (e.g. font-awesome -- in this specific case explicit es6 pruning the font library is a must -- one-on-one basis for other packages) or do we have a in-house icon source. All in all, probably ~1 week of work here to build the UI, answer these questions to some satisfaction and test. |
With Dash 1.0 removing |
With the "hidden" option removed in DASH 1.0, is there a temporary alternative method to achieve the same? Now my app breaks and I am unable to use it anymore. |
@vivekvs1 you can put extra fields in |
I used toggle switches to show and hide sets of columns. So i initialized them with 'hidden':'False' and changed some of them to 'hidden':True though a callback, based on which toggle switch was triggered. |
Feel free to delete this comment if it ends up littering this issue thread but I would like to make it clear the hidden feature on Dash Table 3.7.0 is used by all my important projects. This wasn't some obscure feature hardly used, it's heavily relied on and stops upgrading of most of my projects. Which either use it to sort data not visible to the user (e.g. a status with visible colours but a hidden "serverity" columns to show the red colours at the top) or for users to hide or show columns themselves a configuration UI that I developed.
FYI this doesn't cover my use cases as if the column is removed I can't sort by it, which is a feature that I rely on on use case 1 and a feature I offer to the user in use case 2. |
@notatallshaw I apologize for the disruption. It was important for us to get This is one of our top priority features for table 4.1 / dash 1.1, so hang tight and you'll be able to upgrade as soon as we get the next release out. |
Thanks! Please be aware I'm very greatful for all your efforts as I don't pay for your team's great work on this library. When I am using obscure features and they break I mostly find workarounds, I just wanted help by pointing out as far as I'm aware this is actually a commonly used feature. |
For now, maybe let's defer the global UI work and make this a per-column UI. Originally I thought this needed to be a "global" UI because I thought that the columns would be completely hidden, meaning that there wouldn't be any way to "un-hide" the column unless the UI was elsewhere. But, if we partially hide the columns (i.e. make them really skinny), then we could leave enough room to keep a tiny icon to un-hide them. Similar to #318 (comment), this behaviour could be customized by the dash developer to start to satisfy particular structured workflows and then expanded separately as part of #316 in the future to enable the end-user to customize them. To start, the UI could look like:
Regarding the API: we already have
To start, if multiple properties are provided for the same column, then we raise a JS exception which will be visible to the end-user thanks to dev-tools. In the future, we could allow multiple behaviours with perhaps a context menu or lining up multiple icons next to each other.
|
Discussion notes: Persistence will be done as a 2nd PR or branched out into a 2nd issue. |
Digging into this there's some complications
Overall the smarter feature described above feels muddled at the moment. I'm suggesting that we go back to the simpler implementation for now. Hiding columns individually is consistent with the spreadsheet experience it is attempting to match. Merged cells/columns is a visual trick, not a first class concept for the underlying grid. Side note: Using the opportunity to bump up the "icons" in the table headers from unicode characters to the FontAwesome free icon sets. These are not perfect but they are more consistent and aligned with each other than the unicode characters. This is done through |
localstorage
to save dataThe UI for this (and the other features) will be considered in a separate issue
The text was updated successfully, but these errors were encountered: