None
getItemProps: (itemData: T, index: number) => Omit<ComponentPropsWithoutRef<'div'>, 'key'>
: set properties of item content container's parentgetItemContentProps: (itemData: T, index: number) => Omit<ComponentPropsWithoutRef<'div'>, 'key'>
: set item content container properties
DraggableGridProps.children
andDraggableItem
component is deprecated and removed from export content. We don't need it anymore, use propertyDraggableGridProps.renderItem
instead.
-
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 propertyuniKey
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 ascontent.id
- 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.