Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.41 KB

CHANGELOG.md

File metadata and controls

42 lines (25 loc) · 1.41 KB

v2.1.0

Breaking Changes

None

New API

  • getItemProps: (itemData: T, index: number) => Omit<ComponentPropsWithoutRef<'div'>, 'key'>: set properties of item content container's parent
  • getItemContentProps: (itemData: T, index: number) => Omit<ComponentPropsWithoutRef<'div'>, 'key'>: set item content container properties

v2.0.0

Breaking Changes

Deprecated API

  • DraggableGridProps.children and DraggableItem component is deprecated and removed from export content. We don't need it anymore, use property DraggableGridProps.renderItem instead.

New API

  • DraggableGridProps.data

    Array type, required.

    Property data is data source for this grid, every item of data should have unique key(STRING TYPE) for uniquely identify, and you can use property uniKey to define which is your data item unique key name.

  • DraggableGridProps.renderItem

    Function type, optional. Default to undefined.

    Functions for rendering items with item of data as parameter.

  • DraggableGridProps.uniKey

    String type, optional. Default to 'id'

    Property uniKey is the unique key for every data items. The default value is 'id', you can pass it with lodash-like pathname, such as content.id

Bugfixes and Reasons

  • Scroll position lost: Dynamic add or remove grid items will re-construct the grid.
  • Grid items can't delete dynamicly: Views are not bind with grid instance data model.