Skip to content

Commit

Permalink
fix(material-ui): fix RangeWidget onChange handler #2161 (#3297)
Browse files Browse the repository at this point in the history
* fix(material-ui): fix RangeWidget onChange handler #2161

* fix(mui): fix RangeWidget onChange handler #2161

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
  • Loading branch information
JonCatmull and heath-freenome committed Dec 21, 2022
1 parent aa58b00 commit 68db429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/RangeWidget/RangeWidget.tsx
Expand Up @@ -19,7 +19,7 @@ const RangeWidget = ({
const sliderProps = { value, label, id, name: id, ...rangeSpec(schema) };

const _onChange = (_: any, value?: number | number[]) => {
onChange(value ? options.emptyValue : value);
onChange(value ? value : options.emptyValue);
};
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
onBlur(id, value);
Expand Down
2 changes: 1 addition & 1 deletion packages/mui/src/RangeWidget/RangeWidget.tsx
Expand Up @@ -19,7 +19,7 @@ const RangeWidget = ({
const sliderProps = { value, label, id, name: id, ...rangeSpec(schema) };

const _onChange = (_: any, value?: number | number[]) => {
onChange(value ? options.emptyValue : value);
onChange(value ? value : options.emptyValue);
};
const _onBlur = ({ target: { value } }: React.FocusEvent<HTMLInputElement>) =>
onBlur(id, value);
Expand Down

0 comments on commit 68db429

Please sign in to comment.