nicolaskruchten / pivottable

Open-source Javascript Pivot Table (aka Pivot Grid, Pivot Chart, Cross-Tab) implementation with drag'n'drop.
https://pivottable.js.org/
MIT License
4.36k stars 1.08k forks source link

how to avoid "(too many to list)" #615

Open jupe opened 7 years ago

jupe commented 7 years ago

Seems that menuLimit is by default 500, which are quite small. If data set is bigger it doesn't give any option to filter anymore. I think it could still show first 500 items and allow to search other items as well.

See screenshot: image

nicolaskruchten commented 7 years ago

I'd be interested in a PR that does this efficiently, as I haven't figured out a good way to do it :)

turnerniles commented 7 years ago

The filter values could also be virtualized, so that only ~10 filter values are displayed in the DOM at any one times, and the rest are loaded dynamically upon scrolling. This would increase performance and the number pivottable can handle by default.

uwekoenig commented 5 years ago

Why not only showing a warning of bad performance? I think most people are happy to wait instead of exporting to Excel

uwekoenig commented 5 years ago

@nicolaskruchten Would you agree to add a parameter to enable/disable the filter or alternativly to set the limit by a parameter?

nicolaskruchten commented 5 years ago

@uwekoenig you can already set the limit with menuLimit...?

dreamerworks commented 2 years ago

Although it doesn't answer the partial load in the case of too many items, maybe it would be an improvement if menuLimit <=0 means "unlimited"?

so line 760 would become something like:

if values.length > opts.menuLimit && opts.menuLimit > 0
   ... show "too many"

and line 837 would become something like: if values.length <= opts.menuLimit || opts.menuLimit <=0 If set to "0" or "-1" it would just display all the items. That way we can choose if we want a hard limit and decent performance or if we prefer a possibly huge and slow list with all the values.