1
0
Fork 0

🚧 Fixed handling of default reset in pct options

This commit is contained in:
Joost De Cock 2019-06-28 17:51:07 +02:00
parent 97afac7693
commit 3a6d7c5680
3 changed files with 32 additions and 23 deletions

View file

@ -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);