pivottable icon indicating copy to clipboard operation
pivottable copied to clipboard

how to avoid "(too many to list)"

Open jupe opened this issue 7 years ago • 6 comments

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

jupe avatar Jan 16 '17 20:01 jupe

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

nicolaskruchten avatar Jan 16 '17 20:01 nicolaskruchten

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.

turnerniles avatar May 18 '17 15:05 turnerniles

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

uwekoenig avatar Nov 26 '18 10:11 uwekoenig

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

uwekoenig avatar Mar 07 '19 16:03 uwekoenig

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

nicolaskruchten avatar Mar 07 '19 19:03 nicolaskruchten

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.

dreamerworks avatar Sep 14 '22 08:09 dreamerworks