Skip to content

Commit

Permalink
fix: fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
dbismut committed Jan 17, 2023
1 parent 5bf23fa commit 5e03da0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/leva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"react-colorful": "^5.6.1",
"react-dropzone": "^14.2.3",
"v8n": "^1.5.1",
"zustand": "^4.1.4"
"zustand": "^4.3.2"
}
}
6 changes: 4 additions & 2 deletions packages/leva/src/useControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ export function useControls<S extends Schema, F extends SchemaOrFn<S> | string,
(s) => {
const input = s.data[path]
// @ts-ignore
const value = input.disabled ? undefined : input.stateValue
const value = input.disabled ? undefined : input.value
return [value, input]
},
([value, input]: any) => onChange(value, path, { initial: false, get: store.get, ...input }),
([value, input]: any) => {
onChange(value, path, { initial: false, get: store.get, ...input })
},
{ equalityFn: shallow }
)
unsubscriptions.push(unsub)
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5e03da0

Please sign in to comment.