Coder Social home page Coder Social logo

Item Height about react-picky HOT 5 CLOSED

aidurber avatar aidurber commented on August 12, 2024
Item Height

from react-picky.

Comments (5)

Aidurber avatar Aidurber commented on August 12, 2024

Hi Andre,
Not currently, this is due to react-tiny-virtual-list. Item heights are required to correctly calculate when an item should render.

There is a discussion in #26 about swapping out react-tiny-virtual-list for react-virtualized. It's offers a wide range of different options such as an autosizer and a cellsizer. I'm going to take a look either tonight or tomorrow night at swapping it out to provide a more dynamic virtual list.

Failing finding a nice solution with a nice API, for our needs. Is to remove the internal usage of virtualised lists and leave that up to the developer with a render prop.
Thanks for the issue and the kind words 😃

from react-picky.

Aidurber avatar Aidurber commented on August 12, 2024

After swapping out react-tiny-virtual-list for react-virtualized using the CellMeasurer and AutoSizer components. Dynamic heights with the render prop are possible.
I'll be fixing #26 too before it goes out though.

Here is an example (no more cutting off!):
variable height

from react-picky.

AndreBastos23 avatar AndreBastos23 commented on August 12, 2024

That's awesome, that's really what i need.
I Was going to fork this because i need some more customization, but maybe you have interest in doing this.
Right now, you set the string "x selected" statically. I think you should let people decide what to concat when X elements are selected. For example, right now there is no way to change the string values to my native language. I think a simple prop would resolve this, and this would be more customizable for everyone. Just food for thought :p.

Maybe even pass a object with all the strings you can change, with your values as defaults.

from react-picky.

Aidurber avatar Aidurber commented on August 12, 2024

Yeah I can make a prop for that, no problem. See #29

from react-picky.

Aidurber avatar Aidurber commented on August 12, 2024

I think there are only 2 hard coded strings:

  • placeholder - which has a prop.
  • x selected - which will have a prop.

Do you think the prop would suffice? @AndreBastos23

from react-picky.

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.