Skip to content
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

Checkbox update #22

Merged
merged 2 commits into from
Sep 14, 2020
Merged

Checkbox update #22

merged 2 commits into from
Sep 14, 2020

Conversation

gamalielhere
Copy link
Contributor

No description provided.

@@ -35,11 +29,20 @@ export default {
default: function() {
return { title: '', url: ''};
}
},
value: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm is this suppose to match the prop name isChecked ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oohh i think i get it now

Copy link
Contributor Author

@gamalielhere gamalielhere Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah no. so v-model is the same as passing :value="something" @value="something" ie:

  <mew-checkbox v-model="something"></mew-checkbox>
  
  <mew-checkbox :value="something" @input="something = $event"></mew-checkbox>

So it should work the same but when the value changes, the parent can react to it aswell. Only thing is that there's no data object in storybook so I cant use it there at the moment since I cant mutate props.

@gesseekur gesseekur merged commit 56149f0 into master Sep 14, 2020
@gesseekur gesseekur deleted the checkbox-update branch September 14, 2020 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants