Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding default properties to NetworkForm #10682

Merged
merged 1 commit into from
Mar 22, 2021
Merged

Adding default properties to NetworkForm #10682

merged 1 commit into from
Mar 22, 2021

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Mar 21, 2021

Fixes #10681

In NetworkForm, the initial is state is given default values of component properties. When navigating to the "Add a network form" from the network dropdown specifically, those initial properties are undefined. In the case of adding a network, those fields should default to ''. This simply adds a defaultProps block ensuring that the values are prop || '' as they should not be undefined when set as the initial value of a text input field.

Manual testing steps:
Defined in issue

Reviewer's manual testing note - a simple regression test for adding and managing custom networks should be performed from both the network dropdown and the settings tab.

@ryanml ryanml self-assigned this Mar 21, 2021
@ryanml ryanml requested a review from a team as a code owner March 21, 2021 03:39
@ryanml ryanml requested a review from shanejonas March 21, 2021 03:39
@metamaskbot
Copy link
Collaborator

Builds ready [992b5ae]
Page Load Metrics (548 ± 22 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint42604652
domContentLoaded3505715464622
load3515715484622
domInteractive3505705464622

Copy link
Contributor

@rickycodes rickycodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to me

@ryanml ryanml merged commit fc8ffc1 into develop Mar 22, 2021
@ryanml ryanml deleted the fix-10681 branch March 22, 2021 16:57
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning: A component is changing an uncontrolled input of type text to be controlled....
4 participants