Comments (3)
@turnerniles
We could convert everything to strings and tell the user that everything will be converted to a string. But then the user would be limited with the fancy custom filtering when passing a callback function (I guess they could convert it back to whatever data type they want or we could just not change the data type if a callback is passed). It also feels weird to change the user's data type to a string for filtering but if they do some mathematical aggregations on that dimension (like averaging or maximum/minimum) then it should stay as a number? The more I think about it, the more complicated I think it actually is to manipulate the data type... Maybe we should just handle it on the front-end by using the callback feature for filtering?
from quick-pivot.
I agree in principle if you are writing code and using quick-pivot without a front-end. But when rendering it on the frontend and passing it back, the value passed back will be a string. And if I convert all strings to ints, before calling the filtering function, if the number is stored as a string on the backend then it won't work. Also if we use an <input>
tag to allow the user to pass a custom value, it will also be passed back as a string.
I will use the custom callback for the UI.:
return filterValues.indexOf(value) == -1;
instead of return filterValues.indexOf(value) === -1;
And we can close the issue. What do you think?
from quick-pivot.
Sounds good!
from quick-pivot.
Related Issues (20)
- Add pivot toggle method for expanding / collapsing groups HOT 1
- Filtering / Sorting
- Pivot should not add to collapsedRows if the row cannot be collapsed HOT 1
- Providing incorrect data types for rowsToPivot and/or colsToPivot throws filter error
- Filtering out all data throw error
- 'Include' filtering with values that are a part of the unique values of that field throws error HOT 4
- Should pivot.getUniqueValues return unique values of the current pivot or original?
- Should filters stack / are they chainable? HOT 2
- Totals functionality HOT 2
- Grouping order changes upon filtering of sub-grouping HOT 1
- TypeError: Object.values is not a function HOT 4
- Filtering out all values returns empty array. Should return remaining unfiltered fields with 0 values.
- Support multiple aggregations HOT 2
- Support row totals HOT 1
- Row and column total header HOT 1
- Preserving order or column and row entries? HOT 3
- Support Multiple Aggregation Dimensions HOT 10
- Create excel sheet from the pivot data HOT 2
- Comparison functions used are causing unexpected results
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 quick-pivot.