From 699e9d9ff1c900269e8aeb8e653698d033689dec Mon Sep 17 00:00:00 2001 From: Baorong Li Date: Tue, 4 Jun 2019 15:47:35 +0800 Subject: [PATCH] fix warning inlineCollapsed not control Menu under Sider --- package.json | 4 ++-- src/components/Layout/Menu.js | 2 -- src/components/Layout/Sider.js | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9947d85..a45e741 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "ant-design-pro": "^2.3.0", "antd": "^3.19.0", "axios": "^0.19.0", - "babel-core": "7.0.0-bridge.0", "classnames": "^2.2.6", "d3-shape": "^1.3.0", "draftjs-to-html": "^0.8.4", @@ -19,7 +18,6 @@ "echarts-gl": "^1.1.1", "echarts-liquidfill": "^2.0.2", "enquire-js": "^0.2.1", - "eslint-plugin-react-hooks": "^1.6.0", "highcharts-exporting": "^0.1.7", "highcharts-more": "^0.1.7", "json-format": "^1.0.1", @@ -42,6 +40,7 @@ "@lingui/babel-preset-react": "^2.8.2", "@lingui/cli": "^2.8.2", "@lingui/loader": "^2.8.2", + "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.0.1", "babel-plugin-dev-expression": "^0.2.1", "babel-plugin-import": "^1.12.0", @@ -54,6 +53,7 @@ "eslint-plugin-import": "^2.17.0", "eslint-plugin-jsx-a11y": "^6.2.1", "eslint-plugin-react": "^7.13.0", + "eslint-plugin-react-hooks": "^1.6.0", "husky": "^2.3.0", "less-vars-to-js": "^1.3.0", "lint-staged": "^8.1.0", diff --git a/src/components/Layout/Menu.js b/src/components/Layout/Menu.js index 642f93b..7751702 100644 --- a/src/components/Layout/Menu.js +++ b/src/components/Layout/Menu.js @@ -100,7 +100,6 @@ class SiderMenu extends PureComponent { mode="inline" theme={theme} onOpenChange={this.onOpenChange} - inlineCollapsed={collapsed} selectedKeys={selectedKeys} onClick={ isMobile @@ -121,7 +120,6 @@ SiderMenu.propTypes = { menus: PropTypes.array, theme: PropTypes.string, isMobile: PropTypes.bool, - collapsed: PropTypes.bool, onCollapseChange: PropTypes.func, } diff --git a/src/components/Layout/Sider.js b/src/components/Layout/Sider.js index 2179aa1..3374c8a 100644 --- a/src/components/Layout/Sider.js +++ b/src/components/Layout/Sider.js @@ -49,7 +49,6 @@ class Sider extends PureComponent { menus={menus} theme={theme} isMobile={isMobile} - collapsed={collapsed} onCollapseChange={onCollapseChange} />