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

Revisit v-model for text entry forms #154

Closed
surchs opened this issue May 26, 2022 · 1 comment
Closed

Revisit v-model for text entry forms #154

surchs opened this issue May 26, 2022 · 1 comment
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again

Comments

@surchs
Copy link
Contributor

surchs commented May 26, 2022

The suggested solution from the vuex documentation to handle forms that affect vuex objects is to use a two-way computed property with a setter and getter like so:

<input v-model="message">
// ...
computed: {
  message: {
    get () {
      return this.$store.state.obj.message
    },
    set (value) {
      this.$store.commit('updateMessage', value)
    }
  }
}

We should consider doing this as well to handle our text input fields that are not currently in sync with the global store #128

@stale
Copy link

stale bot commented Nov 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the _flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again label Nov 29, 2022
@stale stale bot closed this as completed Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_flag:stale [BOT ONLY] Flag issue that hasn't been updated in a while and needs to be triaged again
Projects
None yet
Development

No branches or pull requests

1 participant