Skip to content

Feature Request: Support for Variable Item Heights #97

@ruveydayilmaz

Description

@ruveydayilmaz

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
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions