Comments (3)
Thanks for the feature request, @appel. I've added it to my to-do list.
from flexitable.
Thanks @adammessinger, looking forward to it!
from flexitable.
I've made some notes about implementation of this feature request that I'm also putting here for feedback and future reference...
- Keep it compact and simple: array of columns such that keys match
column_maps_list
, with values of0
for hidden or1
for shown. - Load saved visibility state array after init (or create it w/ all visible if it doesn't exist).
- Update visibility array value for a column when user checks/unchecks a column box, but save to
localStorage
after showing/hiding the column to avoid a slowdown in visual response to user input. - Some
localStorage
issues to keep in mind. - Need to give some thought to storage keys. Simply using the table ID could cause data over-writes and unexpected behavior if the plugin user has multiple tables with the same ID. Something like this would work as long as there are no tables with matching IDs at the same URL:
'flexitable_[' + window.location.href + ']_' + view_model.id
- Be mindful of storage quotas. As a product or site using Flexitable evolves, tables and whole pages may disappear or table IDs may change. Orphaned keys may bloat storage, and there's a slim chance of exceeding quota. Handle the resulting error (and the lack thereof in IE) gracefully, perhaps by (silently?) clearing all Flexitable storage for that domain and then retrying the save.
- Some quick calculations assuming tables with 24 columns and pages with longish URLs indicate that Flexitable could store up to about 25,000 tables worth of column visibility info per origin for browsers with a 10 MB quota -- half that for some browsers with a 5 MB quota.
- According to MDN, Safari gives
localStorage
a quota of 0 in private browsing mode, rendering it unusable. Look into exactly how this manifests in terms of quota errors. Fortunately, other browsers are said to simply treatlocalStorage
likesessionStorage
in private mode.
from flexitable.
Related Issues (6)
- If Flexitable was run with init_toggle_on_button_click option set to true, can't destroy HOT 1
- Destroy Method Should Show All Hidden Columns HOT 2
- When printing, columns hidden by user shouldn't print HOT 1
- In Safari 9, responsive features cause profound slowdown of plugin initialization
- _updateProgressMeter() throws error if use_toggle_button option is false HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexitable.