React-sortable-tree: rowDirection warning

Created on 17 Jul 2018  路  11Comments  路  Source: frontend-collective/react-sortable-tree

Since last update of react-sortable-tree v2.2.0, I have this new warning :

Warning: React does not recognize therowDirectionprop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercaserowdirectioninstead. If you accidentally passed it from a parent component, remove it from the DOM element.

I don't pass any rowDirection parameter on my instanciation ....

Can you check this ?

Thanks,

possible bug (need more info)

Most helpful comment

@kbulygin Sorry can you explain how you fixed this problem. This seems more of a workaround then a proper fix.

I'm also not following the workaround you suggested. It looks like your adding the missing property and wrapping the original SortedTree Component created a new component.

All 11 comments

I have the same problem. Would be nice to get this resolved.

I am also seeing this console error. Here is the full stack trace:

image

Any update on this ?

I'm also seeing this error

yep.. ditto

I have the same problem

+the same problem

Try this :

const { test, test2, ...rest } = this.props
delete rest['rowdirection']

See #213. I solved #370 in exactly the same way as #213: by reading the current version of https://github.com/frontend-collective/react-sortable-tree/blob/master/src/tree-node.js and updating my code, namely:

class Node extends React.Component {
  render() {
    const { <a list of variables...>, rowDirection, ...restProps } = this.props;
    <...>
  }
  <...>
}

Node.defaultProps = { 
  <...>, 
  rowDirection: 'ltr', // like in the original tree-node.js
};

Node.propTypes = {
  <...>,
  rowDirection: PropTypes.string,
};

@kbulygin Sorry can you explain how you fixed this problem. This seems more of a workaround then a proper fix.

I'm also not following the workaround you suggested. It looks like your adding the missing property and wrapping the original SortedTree Component created a new component.

Actually, the issue is caused by the theme which i'm using. https://github.com/frontend-collective/react-sortable-tree-theme-full-node-drag/issues/6

Looks like the proper fix never moved over

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oarashi picture oarashi  路  5Comments

2503shubham picture 2503shubham  路  3Comments

29er picture 29er  路  5Comments

bigjujube picture bigjujube  路  4Comments

brendanmoore picture brendanmoore  路  5Comments