问题
I want to use react-sortable-hoc with react-virtualized's Grid where the rows are sortable. I cannot use the List as I have multiple columns and I cannot use it with the Table because I have too many columns and therefore need horizontal scrolling.
The issue that I am facing is that the Grid does not have a rowRenderer
callback as the Table or List has (it only has cellRenderer and cellRenderer), thus I don't know what to wrap the SortableElement
around.
I would appreciate any ideas or examples of this usage?
回答1:
I ended up implementing this as a cellRangeRenderer - see my comment on this GitHub issue: https://github.com/clauderic/react-sortable-hoc/issues/295#issuecomment-344070823
来源:https://stackoverflow.com/questions/46847633/using-react-sortable-hoc-with-react-virtualized-grid