Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support for Variable Item Heights #97

Open
ruveydayilmaz opened this issue Dec 28, 2024 · 0 comments
Open

Feature Request: Support for Variable Item Heights #97

ruveydayilmaz opened this issue Dec 28, 2024 · 0 comments

Comments

@ruveydayilmaz
Copy link

Description:

Currently, the package only supports a fixed item height via the itemHeight prop. However, it would be highly beneficial to have support for different item heights, as many use cases require varying heights for grid items.

Proposed Solution:

  • Add support for variable item heights based on the individual item's data.
  • Allow each item to define its height dynamically (e.g., through a function or by providing a height property in the data for each item).
  • Ensure that the grid layout and drag-and-drop functionality work smoothly with different item heights.

Example Use Case:

<DraggableGrid
  numColumns={numColumns}
  renderItem={renderItem}
  data={data}
  onDragRelease={handleDragRelease}
  itemHeight={(item) => item.height} // Dynamically set the height per item
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant