を実装しようとしていますreact-grid-layout
。_grid
すべての例は、 div プロパティを介してグリッド アイテムの構成を渡します。
createElement(el) {
...
return (
<div key={i} _grid={el}>
...
</div>
);
},
私の実装では:
return (
<div key={i} _grid={el}>
<DashboardTestWidget widgetName={el.name} menuName={this.props.menuName}/>
<span className="remove" style={removeStyle} onClick={this.onRemoveItem.bind(this, i)}>x</span>
</div>
)
エラーが発生します:
dashboard_view.browserify.browserified.js:1216 Warning: Unknown prop `_grid` on <div> tag. Remove this prop from the element. For details, see <URL ommitted because SO complained about URL shorteners>
in div (created by DashboardLayout)
in Resizable (created by GridItem)
in DraggableCore (created by GridItem)
in GridItem (created by ReactGridLayout)
in div (created by ReactGridLayout)
in ReactGridLayout (created by ResponsiveReactGridLayout)
in ResponsiveReactGridLayout (created by _class)
in _class (created by DashboardLayout)
in div (created by DashboardLayout)
in DashboardLayout
私はReactにかなり慣れていません。私は何を間違っていますか?
私が使用する関連npm
パッケージのバージョン:
"react": "^15.2.1",
"react-dom": "^15.2.1",
"react-grid-layout": "^0.12.7",