Giter Site home page Giter Site logo

Comments (3)

pat310 avatar pat310 commented on August 20, 2024

@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.

turnerniles avatar turnerniles commented on August 20, 2024

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.

pat310 avatar pat310 commented on August 20, 2024

Sounds good!

from quick-pivot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.