SortableJS / react-sortablejs

React bindings for SortableJS
http://sortablejs.github.io/react-sortablejs/
MIT License
2.04k stars 210 forks source link

TypeError: Cannot read properties of null (reading 'props') #271

Open fengxinming opened 1 year ago

fengxinming commented 1 year ago

child is uniformly converted into null.

return Children.map(children as ReactElement<any>[], (child, index) => {
      if (child === undefined) return undefined;

      const item = list[index] || {};
      const { className: prevClassName } = child.props;

      // @todo - handle the function if avalable. I don't think anyone will be doing this soon.
      const filtered = typeof filter === "string" && {
        [filter.replace(".", "")]: !!item.filtered,
      };
nolikob commented 11 months ago

is there any workaround for this? I would really appreciate it :)