Interface: IDraggableListProps<T>
Defined in: submodules/univer/packages/design/src/components/draggable-list/DraggableList.tsx:23
Extends
Omit
<RGL.ReactGridLayoutProps
,"layout"
|"onLayoutChange"
|"cols"
|"isResizable"
>
Type Parameters
Type Parameter |
---|
T |
Properties
Property | Type | Description | Inherited from | Defined in |
---|---|---|---|---|
allowOverlap? | boolean | If true, grid can be placed one over the other. | Omit.allowOverlap | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:213 |
autoSize? | boolean | If true, the container height swells and contracts to fit contents. | Omit.autoSize | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:130 |
children? | ReactNode | - | Omit.children | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:302 |
className? | string | The classname to add to the root element. | Omit.className | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:114 |
compactType? | null | "horizontal" | "vertical" | Compaction type. | Omit.compactType | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:150 |
containerPadding? | [number , number ] | Padding inside the container [x, y] in px. | Omit.containerPadding | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:317 |
draggableCancel? | string | A CSS selector for tags that will not be draggable. For example: draggableCancel: '.MyNonDraggableAreaClassName' If you forget the leading. it will not work. "".react-resizable-handle” is always prepended to this value. | Omit.draggableCancel | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:138 |
draggableHandle? | string | A CSS selector for tags that will act as the draggable handle. For example: draggableHandle: '.MyDragHandleClassName' If you forget the leading . it will not work. | Omit.draggableHandle | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:145 |
droppingItem? | { h : number ; i : string ; w : number ; } | Configuration of a dropping element. Dropping element is a “virtual” element which appears when you drag over some element from outside. | Omit.droppingItem | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:161 |
droppingItem.h | number | - | - | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:164 |
droppingItem.i | string | - | - | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:162 |
droppingItem.w | number | - | - | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:163 |
idKey | keyof T | - | - | submodules/univer/packages/design/src/components/draggable-list/DraggableList.tsx:26 |
innerRef? | Ref <HTMLDivElement > | Ref for getting a reference for the grid’s wrapping div. You can use this instead of a regular ref and the deprecated `ReactDOM.findDOMNode()“ function. | Omit.innerRef | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:298 |
isBounded? | boolean | If true and draggable, all items will be moved only within grid. | Omit.isBounded | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:196 |
isDraggable? | boolean | If set to false it will disable dragging on all children. | Omit.isDraggable | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:186 |
isDroppable? | boolean | If true, droppable elements (with draggable={true} attribute) can be dropped on the grid. It triggers “onDrop” callback with position and event object as parameters. It can be useful for dropping an element in a specific position NOTE: In case of using Firefox you should add onDragStart={e => e.dataTransfer.setData('text/plain', '')} attribute along with draggable={true} otherwise this feature will work incorrect. onDragStart attribute is required for Firefox for a dragging initialization See https://bugzilla.mozilla.org/show_bug.cgi?id=568313 | Omit.isDroppable | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:231 |
itemRender | (item : T , index : number ) => ReactNode | - | - | submodules/univer/packages/design/src/components/draggable-list/DraggableList.tsx:27 |
list | T [] | - | - | submodules/univer/packages/design/src/components/draggable-list/DraggableList.tsx:24 |
margin? | [number , number ] | Margin between items [x, y] in px. | Omit.margin | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:312 |
maxRows? | number | Default Infinity, but you can specify a max here if you like. Note that this isn’t fully fleshed out and won’t error if you specify a layout that extends beyond the row capacity. It will, however, not allow users to drag/resize an item past the barrier. They can push items beyond the barrier, though. Intentionally not documented for this reason. | Omit.maxRows | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:179 |
onDrag? | ItemCallback | Calls on each drag movement. | Omit.onDrag | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:260 |
onDragStart? | ItemCallback | Calls when drag starts. | Omit.onDragStart | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:255 |
onDragStop? | ItemCallback | Calls when drag is complete. | Omit.onDragStop | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:265 |
onListChange | (list : T []) => void | - | - | submodules/univer/packages/design/src/components/draggable-list/DraggableList.tsx:25 |
onResize? | ItemCallback | Calls when resize movement happens. | Omit.onResize | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:275 |
onResizeStart? | ItemCallback | Calls when resize starts. | Omit.onResizeStart | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:270 |
onResizeStop? | ItemCallback | Calls when resize is complete. | Omit.onResizeStop | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:280 |
preventCollision? | boolean | If true, grid items won’t change position when being dragged over. | Omit.preventCollision | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:218 |
resizeHandle? | ReactNode | (resizeHandle ) => ReactNode | Defines custom component for resize handle | Omit.resizeHandle | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:250 |
resizeHandles? | ResizeHandle [] | Defines which resize handles should be rendered Allows for any combination of: ‘s’ - South handle (bottom-center) ‘w’ - West handle (left-center) ‘e’ - East handle (right-center) ‘n’ - North handle (top-center) ‘sw’ - Southwest handle (bottom-left) ‘nw’ - Northwest handle (top-left) ‘se’ - Southeast handle (bottom-right) ‘ne’ - Northeast handle (top-right) | Omit.resizeHandles | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:245 |
rowHeight? | number | Rows have a static height, but you can change this based on breakpoints if you like. | Omit.rowHeight | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:155 |
style? | CSSProperties | Inline-style object to pass to the root element. | Omit.style | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:119 |
transformScale? | number | If parent DOM node of ResponsiveReactGridLayout or ReactGridLayout has “transform: scale(n)” css property, we should set scale coefficient to avoid render artefacts while dragging. | Omit.transformScale | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:208 |
useCSSTransforms? | boolean | Uses CSS3 translate() instead of position top/left. This makes about 6x faster paint performance. | Omit.useCSSTransforms | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:202 |
verticalCompact? | boolean | If true, the layout will compact vertically. | Omit.verticalCompact | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:170 |
width? | number | This allows setting the initial width on the server side. This is required unless using the HOC | Omit.width | node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:125 |
Methods
onDrop()?
optional onDrop(
layout,
item,
e): void
Defined in: node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:285
Calls when some element has been dropped
Parameters
Parameter | Type |
---|---|
layout | Layout [] |
item | Layout |
e | Event |
Returns
void
Inherited from
Omit.onDrop
onDropDragOver()?
optional onDropDragOver(e):
| undefined
| false
| {
h: number;
w: number;
}
Defined in: node_modules/.pnpm/@types+react-grid-layout@1.3.5/node_modules/@types/react-grid-layout/index.d.ts:292
Calls when an element is being dragged over the grid from outside as above. This callback should return an object to dynamically change the droppingItem size Return false to short-circuit the dragover
Parameters
Parameter | Type |
---|---|
e | DragOverEvent |
Returns
| undefined
| false
| {
h
: number
;
w
: number
;
}
Inherited from
Omit.onDropDragOver