1
0
Fork 0

fix(components): Correctly load saved value for mm options

Closes #1136
This commit is contained in:
Joost De Cock 2021-06-20 15:55:58 +02:00
parent 05bf9ca34d
commit 499996ea05
2 changed files with 5 additions and 1 deletions

View file

@ -43,6 +43,9 @@
Fixed: Fixed:
charlie: charlie:
- Add `@freesewing/plugin-mirror` as peer dependency - Add `@freesewing/plugin-mirror` as peer dependency
components:
- Correctly load saved value for mm options
See [#1136](https://github.com/freesewing/freesewing/issues/1136)
paco: paco:
- The waistband was incorrectly using the cuff widht - The waistband was incorrectly using the cuff widht
See [#1113](https://github.com/freesewing/freesewing/issues/1113) See [#1113](https://github.com/freesewing/freesewing/issues/1113)

View file

@ -16,10 +16,11 @@ const PatternOptionMillimeter = ({
updateValue, updateValue,
name, name,
dflt, dflt,
value,
raiseEvent, raiseEvent,
noDocs noDocs
}) => { }) => {
const [val, setVal] = useState(dflt) const [val, setVal] = useState(value === null ? dflt : value)
const [previousValue, setPreviousValue] = useState(dflt) const [previousValue, setPreviousValue] = useState(dflt)
const [expanded, setExpanded] = useState(false) const [expanded, setExpanded] = useState(false)