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

fix(d-form-textarea): add the 'value' prop #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BenoitZugmeyer
Copy link

@BenoitZugmeyer BenoitZugmeyer commented Jun 19, 2019

Passing a value prop to the FormTextarea didn't do anything for two reasons:

  • the value prop wasn't declared, so it was always undefined

  • the localValue prop wasn't passed to the underlying textarea component, so the textarea wasn't controlled (it did not show the current value).

Using a v-model on the textarea simplifies the code a bit by sending and updating localValue at the same time.

PS - I read the contributing guidelines after making a fix for this issue, that's why I didn't take time to discuss about it first. Of course, we can still discuss this, and feel free to discard the PR completely.

Passing a 'value' prop to the FormTextarea didn't do anything for two
reasons:

* the 'value' prop wasn't declared, so it was always undefined

* the 'localValue' prop wasn't passed to the underlying textarea
component, so the textarea wasn't controlled (it did not show the
current value).

Using a v-model on the textarea simplifies the code a bit by sending
and updating localValue at the same time.
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

1 participant