JonathanDoerfler
JonathanDoerfler
NNuxt
Created by JonathanDoerfler on 6/10/2024 in #❓・help
size prop from FormGroup not passed down via app.config?
Hello together, I'm using Nuxt UI and have the following page:
<UFormGroup label="Name">
<UInput v-model="form.name" type="text" />
</UFormGroup>
<UFormGroup label="Name">
<UInput v-model="form.name" type="text" />
</UFormGroup>
and in app.config.ts:
formGroup: {
default: {
size: 'lg'
}
}
formGroup: {
default: {
size: 'lg'
}
}
But the rendered UInput has still size md - doese anybody else have the same problem? Thanks in advance!
1 replies
NNuxt
Created by JonathanDoerfler on 5/31/2024 in #❓・help
useModals() with ??? instead of own component?
#nuxtUI Is it possible to use useModal() without having to create a new component? For example with a template literal or someting like an "inline component"?
1 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
I'm struggling to type the ref-element for a UInput, has anybody done that yet?
const el = ref<???>()
onMounted(() => el.value?.input.focus())
[...]
<UInput ref="el" />
const el = ref<???>()
onMounted(() => el.value?.input.focus())
[...]
<UInput ref="el" />
Currently I'm using any, but I installed eslint at it's not happy with that... 😅
16 replies
NNuxt
Created by JonathanDoerfler on 5/22/2024 in #❓・help
UModal necessary when programmatically using UModals?
Hey there I am currently struggling to find a use case, why one should use<UModal> when using <UModals> and useModal() programmatically. Am I just blind or did I really find a way to make the codebase a little neater? 🙈 In my case, I have a component that shows a form (let's call it MyForm). On another page, I want to open the same form within an modal. For now, I would have to create a new component NewComp only consisting of <template><UModal><MyForm></UModal></template>. I would prefer calling useModal().open(MyForm) instead of useModal().open(NewComp) - the code should already know that I want to open a modal?
1 replies