JonathanDoerfler
how can i close all accordion's label with 1 click?
Oh, didn't read carefully...
You're right, the video shows a working example..
I did a little digging and found this issue: https://github.com/tailwindlabs/headlessui/issues/2876
Seems like the issue is fixed in the latest @headlessui/react version, but at the bottom people are asking for vue support... So perhaps Benjamin @benjamincanac showed the upcoming v3 of NuxtUI?
27 replies
how can i close all accordion's label with 1 click?
I looked into https://github.com/nuxt/ui/blob/dev/src/runtime/components/elements/Accordion.vue
There you can see
1. how elements can be closed (line 155) and
2. that
buttonRefs
is exposed (line 194)27 replies
how can i close all accordion's label with 1 click?
Hi @8l8
You can ref the UAccordion and then iterate over the Buttons.
see https://stackblitz.com/edit/nuxt-ui-22j1bp
Don't know if it's the intended way of doing so, but it works for me...
27 replies
Create new v4 app
short answer: yes
long answer: @manniL / TheAlexLichter released a video for you with a detailed explanation on how to granularly enable/disable the new features: https://www.youtube.com/watch?v=r4wFKlcJK6c
8 replies
How to close programmatically opened nuxt ui modal from within the modal
For only closing, you can use
useModal().close()
also from within the modal.
Like this:
If you want your parent component to do something you have to emit a custom event (see the example at https://ui.nuxt.com/components/modal#control-programmatically)3 replies
How to typescript UInput?
I tried to read the code of NuxtUI but could only find types of
InputSize
, InputColor
and InputVariant
- so yeah, I think there is no full export of the UInput-type... (As I mentioned, the code from github issue #1019 didn't work for me, either I'm dumb or the code changed since 11/2023...)16 replies
How to typescript UInput?
Yeah, same error as with
HTMLInputElement
: Property 'input' does not exist on type 'HTMLDivElement'. Did you mean 'oninput'?ts(2551) 😦
I couldn't find anything useful that's exported in https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Input.vue myself...16 replies
How to typescript UInput?
Thanks @Sam K!
I'm trying to switch between several Input-Fields. Roughly like this::
When working with
any
as ?? and refInTwo.input.focus() instead of refInTwo.focus(), it works as planned - but then there is eslint/typecheck 😅16 replies
How to typescript UInput?
Sorry I forgot to mention I'm using NuxtUI, so the root element inside
<UInput />
is a div.. I was following https://github.com/nuxt/ui/issues/1019 but the import type ...
part did not work...?16 replies