Skip to content

Compat: Fix defaultValue not applied when value==null/undefined#2957

Merged
marvinhagemeister merged 2 commits intomasterfrom
compat-default-value
Jan 26, 2021
Merged

Compat: Fix defaultValue not applied when value==null/undefined#2957
marvinhagemeister merged 2 commits intomasterfrom
compat-default-value

Conversation

@marvinhagemeister
Copy link
Copy Markdown
Member

This PR addresses an issue in preact/compat in regards to the handling of defaultValue. When both defaulValue and value are present, but the latter is null or undefined we would overwrite the correct value we set earlier with the wrong one. This lead to defaultValue effectively never being set.

Fixes #2954

@coveralls
Copy link
Copy Markdown

coveralls commented Jan 24, 2021

Coverage Status

Coverage remained the same at 99.441% when pulling e0842e8 on compat-default-value into 5044515 on master.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 24, 2021

Size Change: +33 B (0%)

Total Size: 42.1 kB

Filename Size Change
compat/dist/compat.js 3.46 kB +12 B (0%)
compat/dist/compat.module.js 3.48 kB +10 B (0%)
compat/dist/compat.umd.js 3.52 kB +11 B (0%)
ℹ️ View Unchanged
Filename Size Change
debug/dist/debug.js 2.99 kB 0 B
debug/dist/debug.module.js 2.98 kB 0 B
debug/dist/debug.umd.js 3.07 kB 0 B
devtools/dist/devtools.js 232 B 0 B
devtools/dist/devtools.module.js 240 B 0 B
devtools/dist/devtools.umd.js 308 B 0 B
dist/preact.js 3.93 kB 0 B
dist/preact.min.js 3.98 kB 0 B
dist/preact.module.js 3.97 kB 0 B
dist/preact.umd.js 4.02 kB 0 B
hooks/dist/hooks.js 1.13 kB 0 B
hooks/dist/hooks.module.js 1.15 kB 0 B
hooks/dist/hooks.umd.js 1.2 kB 0 B
jsx-runtime/dist/jsxRuntime.js 327 B 0 B
jsx-runtime/dist/jsxRuntime.module.js 335 B 0 B
jsx-runtime/dist/jsxRuntime.umd.js 405 B 0 B
test-utils/dist/testUtils.js 437 B 0 B
test-utils/dist/testUtils.module.js 439 B 0 B
test-utils/dist/testUtils.umd.js 515 B 0 B

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

defaultValue not working for @material-ui TextField

3 participants