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

Make text/number inputs of ColorPicker keep draft values while focused #41264

Prev Previous commit
Have UnitControl avoid sending undefined through onUnitChange
stokesman committed May 24, 2022
commit 301c3d4e10da08d205efe0fad79fce15ec481d37
2 changes: 1 addition & 1 deletion packages/components/src/unit-control/index.tsx
Original file line number Diff line number Diff line change
@@ -179,7 +179,7 @@ function UnforwardedUnitControl(
const changeProps = { event, data };

// The `onChange` callback already gets called, no need to call it explicitely.
onUnitChange?.( validParsedUnit, changeProps );
onUnitChange?.( validParsedUnit ?? '', changeProps );

setUnit( validParsedUnit );
}