This reverts commit 765545570f.
This commit is contained in:
parent
5b149d7c96
commit
8f23aeeae5
2 changed files with 3 additions and 3 deletions
|
|
@ -41,7 +41,7 @@ export default class BoolSetting extends PureComponent {
|
|||
};
|
||||
|
||||
handleChange = (value) => {
|
||||
this.props.onChange(this.props.id, Boolean(value));
|
||||
this.props.onChange(this.props.id, `${value}`);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ describe('components/widgets/settings/TextSetting', () => {
|
|||
|
||||
wrapper.instance().handleChange(false);
|
||||
expect(onChange).toHaveBeenCalledTimes(1);
|
||||
expect(onChange).toHaveBeenCalledWith('elementid', false);
|
||||
expect(onChange).toHaveBeenCalledWith('elementid', 'false');
|
||||
|
||||
wrapper.instance().handleChange(true);
|
||||
expect(onChange).toHaveBeenCalledTimes(2);
|
||||
expect(onChange).toHaveBeenCalledWith('elementid', true);
|
||||
expect(onChange).toHaveBeenCalledWith('elementid', 'true');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue