Skip to content

Commit fe7aeab

Browse files
committed
docs(innerRef): clarify flow type
Thanks @kangaechigai, Ref: react-grid-layout#1648
1 parent de45d2d commit fe7aeab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,9 @@ onDropDragOver: (e: DragOverEvent) => ?({|w?: number, h?: number|} | false),
415415

416416
// Ref for getting a reference for the grid's wrapping div.
417417
// You can use this instead of a regular ref and the deprecated `ReactDOM.findDOMNode()`` function.
418-
innerRef: ?React.Ref<"div">,
418+
// Note that this type is React.Ref<HTMLDivElement> in TypeScript, Flow has a bug here
419+
// https://github.com/facebook/flow/issues/8671#issuecomment-862634865
420+
innerRef: {current: null | HTMLDivElement},
419421
```
420422

421423
### Responsive Grid Layout Props

0 commit comments

Comments
 (0)