-
Notifications
You must be signed in to change notification settings - Fork 63
fix: fast username input bug fixed #47
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
Conversation
amanuela97
commented
Aug 6, 2021
- username field in form is not longer buggy when typing fast
|
🔨 Explore the source changes: 6798046 |
components/TField.vue
Outdated
| :item="item" | ||
| v-on="$attrs.listeners" | ||
| @input="(val) => $emit('input', set(val))" | ||
| @update="(val) => $emit('input', set(val))" |
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.
This will emit input event, but later on you use update event. Are you sure it works?
|
Please add:
|
| field.onChange(val) | ||
| } | ||
|
|
||
| this.$emit('input', val) |
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.
this is probably used somewhere, did you check?
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.
i did and form seems to function the same without it
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.
check commit where this line was added and see why
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 seems redundant since inline emit in another file
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 sets a new value for the form, whenever any field is changed. If this event is not emitted v-model of the form won't be updated.
| :value="value ? value[field.name] : ''" | ||
| :item="value" | ||
| v-bind="field" | ||
| :error="usernameError" |
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.
this is a form components, username is not always one of the fields of the form
| return | ||
| } | ||
|
|
||
| await this.find('username', newName) |
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.
maybe you can just put this code inside a new method validate and call this method on form save?
| </TPopup> | ||
|
|
||
| <TPopup v-else-if="slide == 2" @close="close"> | ||
| <TPopup v-else-if="slide === 2" @close="close"> |
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.
this change is not part of this issue
|
fixed in #50 |
