New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(useVModel): support clone
option
#2022
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to be a separate clone
option that accepts boolean
and custom functions. Refer to
vueuse/packages/core/useManualRefHistory/index.ts
Lines 18 to 24 in 98104e1
/** | |
* Clone when taking a snapshot, shortcut for dump: JSON.parse(JSON.stringify(value)). | |
* Default to false | |
* | |
* @default false | |
*/ | |
clone?: boolean | CloneFn<Raw> |
done |
clone
option
Ah, nvm. it seems I was reviewing the wrong diff. This looks good to me in general but I need to hold it for a while long to make sure it behave consistent with #2045 |
Description
Fixes side effect when using
useVModel
withpassive
flag and with an object as value.Added a clone option to clone the obj before set to
ref
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).