From 0c08b861ae9982f902ca1f6179bb7a280ebe53aa Mon Sep 17 00:00:00 2001 From: surya-moven Date: Thu, 2 Apr 2020 10:47:33 -0400 Subject: [PATCH 1/5] CHORE: Remove deprecated lifecycle methods --- src/Row.js | 9 +++++---- src/SortableList.js | 19 +++++++------------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/Row.js b/src/Row.js index 32718a8..b11caa1 100644 --- a/src/Row.js +++ b/src/Row.js @@ -142,10 +142,11 @@ export default class Row extends Component { }, }); - componentWillReceiveProps(nextProps) { - if (!this._active && !shallowEqual(this._location, nextProps.location)) { - const animated = !this._active && nextProps.animated; - this._relocate(nextProps.location, animated); + componentDidUpdate() { + const {animated, location} = this.props; + + if (!this._active && !shallowEqual(this._location, location)) { + this._relocate(location, !this._active && animated); } } diff --git a/src/SortableList.js b/src/SortableList.js index 78cd576..b5900a7 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -32,7 +32,7 @@ export default class SortableList extends Component { manuallyActivateRows: PropTypes.bool, keyboardShouldPersistTaps: PropTypes.oneOf(['never', 'always', 'handled']), scrollEventThrottle: PropTypes.number, - decelerationRate: PropTypes.oneOf([PropTypes.string, PropTypes.number]), + decelerationRate: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), pagingEnabled: PropTypes.bool, nestedScrollEnabled: PropTypes.bool, disableIntervalMomentum: PropTypes.bool, @@ -88,7 +88,7 @@ export default class SortableList extends Component { scrollEnabled: this.props.scrollEnabled }; - componentWillMount() { + componentDidMount() { this.state.order.forEach((key) => { this._rowsLayouts[key] = new Promise((resolve) => { this._resolveRowLayout[key] = resolve; @@ -100,20 +100,20 @@ export default class SortableList extends Component { this._resolveHeaderLayout = resolve; }); } + if (this.props.renderFooter && !this.props.horizontal) { this._footerLayout = new Promise((resolve) => { this._resolveFooterLayout = resolve; }); } - } - componentDidMount() { this._onUpdateLayouts(); } - componentWillReceiveProps(nextProps) { - const {data, order} = this.state; - let {data: nextData, order: nextOrder} = nextProps; + componentDidUpdate(prevProps, prevState) { + const {data, order, scrollEnabled} = this.state; + let {data: nextData, order: nextOrder} = this.props; + const {data: prevData} = prevState; if (data && nextData && !shallowEqual(data, nextData)) { nextOrder = nextOrder || Object.keys(nextData) @@ -143,11 +143,6 @@ export default class SortableList extends Component { } else if (order && nextOrder && !shallowEqual(order, nextOrder)) { this.setState({order: nextOrder}); } - } - - componentDidUpdate(prevProps, prevState) { - const {data, scrollEnabled} = this.state; - const {data: prevData} = prevState; if (data && prevData && !shallowEqual(data, prevData)) { this._onUpdateLayouts(); From 294ceafb9d3094eee9cc57b58cf412ecb3b38ecf Mon Sep 17 00:00:00 2001 From: Roy Paterson Date: Tue, 21 Mar 2023 12:16:38 +0000 Subject: [PATCH 2/5] CHORE: add CODEOWNERS file --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..6f1a32f --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @moven/frontend-owners From 3ece39fde9f68a2f7006fa2e9ab6b05a85242640 Mon Sep 17 00:00:00 2001 From: gitops-moven <49290193+gitops-moven@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:26:12 +0100 Subject: [PATCH 3/5] CHORE: update CODEOWNERS through Terraform --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6f1a32f..cc3c408 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,3 @@ +# Managed through Terraform - do not change directly + * @moven/frontend-owners From 2bdc2ae2fc9e64a026ce8de592f026e785f952b9 Mon Sep 17 00:00:00 2001 From: gitops-moven <49290193+gitops-moven@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:32:04 +0100 Subject: [PATCH 4/5] CHORE: update CODEOWNERS through Terraform [skip actions] From c9c44492e6d8b288fc7d82636ed459f089ea3512 Mon Sep 17 00:00:00 2001 From: gitops-moven <49290193+gitops-moven@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:35:22 -0400 Subject: [PATCH 5/5] CHORE: update CODEOWNERS through Terraform [skip actions]