-
Notifications
You must be signed in to change notification settings - Fork 500
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(useFormGroup): app config default input size #2011
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
romhml
force-pushed
the
fix/input-default-size
branch
from
August 2, 2024 14:51
8f3e4b5
to
52cfd4e
Compare
romhml
force-pushed
the
fix/input-default-size
branch
from
August 2, 2024 14:55
52cfd4e
to
6851967
Compare
@@ -62,7 +63,8 @@ export const useFormGroup = (inputProps?: InputProps, config?: any) => { | |||
name: computed(() => inputProps?.name ?? formGroup?.name.value), | |||
size: computed(() => { | |||
const formGroupSize = config.size[formGroup?.size.value as string] ? formGroup?.size.value : null | |||
return inputProps?.size ?? formGroupSize ?? formGroupConfig?.default?.size | |||
const defaultSize = config.default?.size ?? formGroupConfig?.default?.size |
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 guess ?? formGroupConfig?.default?.size
is not necessary as config.default?.size
will always be defined.
benjamincanac
approved these changes
Aug 2, 2024
benjamincanac
changed the title
fix(useFormGroup): app.config.ts default input size
fix(useFormGroup): app config default input size
Aug 2, 2024
binhtranhuu
pushed a commit
to binhtranhuu/nuxt-ui
that referenced
this pull request
Aug 3, 2024
This was referenced Sep 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Linked issue
Resolves #1990
β Type of change
Fixes an issue with the default size configuration of inputs when not used with a FormField introduced in this PR: https://github.com/nuxt/ui/pull/1875.
In short, we were always using the FormGroup's default size instead of prioritising the input's default size configuration.
π Description
π Checklist