Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 44003c6

Browse files
React 16.13 (#713)
1 parent 726c2c6 commit 44003c6

File tree

15 files changed

+47
-51
lines changed

15 files changed

+47
-51
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = E203, E266, E501, E731, W503
2+
ignore = C901, E203, E266, E501, E731, W503
33
max-line-length = 88
44
max-complexity = 18
55
select = B,C,E,F,W,T4

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Unreleased]
6+
### Changed
7+
- [#713](https://github.com/plotly/dash-table/pull/713) Update from React 16.8.6 to 16.13.0
8+
59
## [4.6.1] - 2020-02-27
610
### Added
711
- [#711](https://github.com/plotly/dash-table/pull/711) Added R examples to package help

demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</head>
66
<body>
77
<div id='root'></div>
8-
<script src='https://unpkg.com/react@16.8.6/umd/react.production.min.js'></script>
9-
<script src='https://unpkg.com/react-dom@16.8.6/umd/react-dom.production.min.js'></script>
8+
<script src='https://unpkg.com/react@16.13.0/umd/react.production.min.js'></script>
9+
<script src='https://unpkg.com/react-dom@16.13.0/umd/react-dom.production.min.js'></script>
1010

1111
<script src="./demo.js"></script>
1212
</body>

package-lock.json

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"private::build:py": "dash-generate-components src/dash-table/dash/DataTable.js dash_table -p package-info.json && cp dash_table_base/** dash_table/ && dash-generate-components src/dash-table/dash/DataTable.js dash_table -p package-info.json --r-prefix 'dash'",
2525
"private::host_js": "http-server ./dash_table -c-1 --silent",
2626
"private::lint:ts": "tslint --project tsconfig.json --config tslint.json",
27-
"private::lint:py": "flake8 --exclude=DataTable.py,__init__.py,_imports_.py dash_table && black --check --exclude dash_table .",
27+
"private::lint:py": "flake8 --exclude=DataTable.py,__init__.py,_imports_.py dash_table tests && black --check --exclude dash_table .",
2828
"private::wait_js": "wait-on http://localhost:8080",
2929
"private::opentests": "cypress open",
3030
"private::test.python": "python -m unittest tests/unit/format_test.py",
@@ -86,9 +86,9 @@
8686
"papaparse": "^5.1.1",
8787
"ramda": "^0.26.1",
8888
"raw-loader": "^3.1.0",
89-
"react": "16.9.0",
89+
"react": "16.13.0",
9090
"react-docgen": "^4.1.1",
91-
"react-dom": "16.9.0",
91+
"react-dom": "16.13.0",
9292
"react-select": "^1.3.0",
9393
"remarkable": "^2.0.0",
9494
"sheetclip": "^0.3.0",

src/core/components/IsolatedInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default class IsolatedInput extends PureComponent<IProps, IState> {
4040
return this.props as PropsWithDefaults;
4141
}
4242

43-
componentWillReceiveProps(nextProps: IProps) {
43+
UNSAFE_componentWillReceiveProps(nextProps: IProps) {
4444
const { value } = this.props;
4545
const { value: nextValue } = nextProps;
4646

src/dash-table/components/CellInput/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class CellInput extends PureComponent<ICellProps, ICellState> {
9797
this.propagateChange();
9898
}
9999

100-
componentWillReceiveProps(nextProps: ICellProps) {
100+
UNSAFE_componentWillReceiveProps(nextProps: ICellProps) {
101101
const { value: nextValue } = nextProps;
102102

103103
if (this.state.value !== nextValue) {

src/dash-table/components/ControlledTable/index.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
115115
}
116116

117117
componentDidMount() {
118+
// Fallback method for paste handling in Chrome
119+
// when no input element has focused inside the table
120+
window.addEventListener('resize', this.forceHandleResize);
121+
document.addEventListener('mousedown', this.handleClick);
122+
document.addEventListener('paste', this.handlePaste);
123+
118124
const {
119125
active_cell,
120126
selected_cells,
@@ -132,25 +138,14 @@ export default class ControlledTable extends PureComponent<ControlledTableProps>
132138
this.handleResize();
133139
}
134140

135-
componentWillMount() {
136-
// Fallback method for paste handling in Chrome
137-
// when no input element has focused inside the table
138-
window.addEventListener('resize', this.forceHandleResize);
139-
document.addEventListener('mousedown', this.handleClick);
140-
document.addEventListener('paste', this.handlePaste);
141-
}
142-
143141
componentWillUnmount() {
144142
window.removeEventListener('resize', this.forceHandleResize);
145143
document.removeEventListener('mousedown', this.handleClick);
146144
document.removeEventListener('paste', this.handlePaste);
147145
}
148146

149-
componentWillUpdate() {
150-
this.updateStylesheet();
151-
}
152-
153147
componentDidUpdate() {
148+
this.updateStylesheet();
154149
this.applyStyle();
155150
this.handleResize();
156151
this.handleDropdown();

src/dash-table/components/Table/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class Table extends Component<SanitizedAndDerivedProps, Standalon
4949
};
5050
}
5151

52-
componentWillReceiveProps(nextProps: SanitizedAndDerivedProps) {
52+
UNSAFE_componentWillReceiveProps(nextProps: SanitizedAndDerivedProps) {
5353
this.setState(state => {
5454
const { applyFocus: currentApplyFocus, workFilter: { map: currentMap, value } } = state;
5555

src/dash-table/components/Tooltip/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default class Tooltip extends PureComponent<ITooltipProps, ITooltipState>
4141
};
4242
}
4343

44-
componentWillReceiveProps(nextProps: ITooltipProps) {
44+
UNSAFE_componentWillReceiveProps(nextProps: ITooltipProps) {
4545
const { delay, duration } = nextProps.tooltip;
4646

4747
if (isEqual(

0 commit comments

Comments
 (0)