We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to the type definition, nodes of onSortEnd is an array of HTMLElement:
nodes
onSortEnd
react-sortable-hoc/types/index.d.ts
Lines 26 to 32 in caf3c4f
But in reality, to access the HTMLElement, you need to use nodes[0].node, which triggers TypeScript error:
nodes[0].node
<MySortableList // ... onSortEnd={({ oldIndex, newIndex, nodes }) => { console.log('nodes are', nodes); // {boundingClientRect: null, edgeOffset: null, node: HTMLElement, translate: null}[] const node = nodes[0].node console.log('the actual HTML element is', node); }} // ... />
So it looks like either the typedef is wrong, or the code is wrong.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
According to the type definition,
nodes
ofonSortEnd
is an array of HTMLElement:react-sortable-hoc/types/index.d.ts
Lines 26 to 32 in caf3c4f
But in reality, to access the HTMLElement, you need to use
nodes[0].node
, which triggers TypeScript error:So it looks like either the typedef is wrong, or the code is wrong.
The text was updated successfully, but these errors were encountered: