🚧 Fixed handling of default reset in pct options
This commit is contained in:
parent
97afac7693
commit
3a6d7c5680
3 changed files with 32 additions and 23 deletions
|
@ -30,7 +30,9 @@ const PatternOptionPctDegCount = props => {
|
|||
|
||||
const reset = () => {
|
||||
setValue(props.dflt);
|
||||
props.updateValue(props.name, props.dflt);
|
||||
let factor = 1;
|
||||
if (props.type === "pct") factor = 100;
|
||||
props.updateValue(props.name, props.dflt / factor);
|
||||
};
|
||||
|
||||
const toggleExpanded = () => setExpanded(!expanded);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue