Skip to content

fix(button): remove unsafe method #1115

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ export class Button extends React.PureComponent<ButtonProps> {

private control: HTMLButtonElement | HTMLSpanElement;

// eslint-disable-next-line camelcase
UNSAFE_componentWillReceiveProps(nextProps) {
if (nextProps.disabled) {
componentDidUpdate() {
if (this.props.disabled) {
// eslint-disable-next-line react/no-did-update-set-state
this.setState({
hovered: false,
focused: false
Expand Down
18 changes: 14 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2098,10 +2098,10 @@ ajv@^6.0.1, ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"

alfa-ui-primitives@2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/alfa-ui-primitives/-/alfa-ui-primitives-2.4.3.tgz#60e54418dd1b52b7b66981b65bc187ef04a3294e"
integrity sha512-JEUBA+ldz/TDXAn/JygUGhbYys1okVfpaYP5nsmp5jh0DER921kuVk196WZYywMDwS9J+NSi+cbYqPVufoty1w==
alfa-ui-primitives@2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/alfa-ui-primitives/-/alfa-ui-primitives-2.6.0.tgz#6ecb1e6274e71488b277d3689759d4fe33a4fc1d"
integrity sha512-GpGrBFfKaAedGwZgKnfZrGzYwyMzpH6pwjUuk0cSigUxQTQ3m0SWobUf5SBQ8YgE3fNJVk7q9Myx+9dDqVDeZQ==

aliasify@^1.7.2, aliasify@^1.9.0:
version "1.9.0"
Expand Down Expand Up @@ -3056,6 +3056,11 @@ bem-react-classname@^1.1.0:
resolved "https://registry.yarnpkg.com/bem-react-classname/-/bem-react-classname-1.1.0.tgz#9d61fc2dde16ec53533684f03a74d94202e18447"
integrity sha512-p7SuKwtylDIT5tMoJn9PUEY3DES95H6UBhSPCrusRW6di6vacIieq/jhBorAkBwton0WhYXgZ8qF7gVtLbRv2w==

bem-react-classname@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/bem-react-classname/-/bem-react-classname-1.1.4.tgz#3e0a7deb25e0b19870d9328a7dc5e1dbfcb02b57"
integrity sha512-qzIGsvW3tFHsXL7AG/8Ynx2ogTz6EdfooJ474km+bkAN7HaZFMUJE/6HXAtZg+rClzt6N2NUL5eG7lq7a6fepQ==

[email protected]:
version "2.1.0"
resolved "https://registry.yarnpkg.com/bezier-easing/-/bezier-easing-2.1.0.tgz#c04dfe8b926d6ecaca1813d69ff179b7c2025d86"
Expand Down Expand Up @@ -17455,6 +17460,11 @@ util@~0.10.1:
dependencies:
inherits "2.0.3"

utility-types@^3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/utility-types/-/utility-types-3.10.0.tgz#ea4148f9a741015f05ed74fd615e1d20e6bed82b"
integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==

[email protected]:
version "1.0.1"
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
Expand Down