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

Drawer with nested lists #80

Closed
Kestami opened this issue Oct 15, 2021 · 3 comments
Closed

Drawer with nested lists #80

Kestami opened this issue Oct 15, 2021 · 3 comments

Comments

@Kestami
Copy link

Kestami commented Oct 15, 2021

Hi, hopefully this is the right place to ask a question, I couldn't find another means of asking!

Is it possible to create a drawer that has nested lists in it?

  • item a
  • item b
  • item b.1

  • item b.2

  • item c

Thanks in advance!

@elf-mouse
Copy link
Member

Hi @Kestami ,

<ui-list-group>
  <ui-list-group-subheader>List Title 1</ui-list-group-subheader>
  <ui-nav>
    <ui-nav-item v-for="i in 3" :key="i">Item 1-{{ i }}</ui-nav-item>
  </ui-nav>

  <ui-list-divider></ui-list-divider>

  <ui-list-group-subheader>List Title 2</ui-list-group-subheader>
  <ui-nav>
    <ui-nav-item v-for="i in 3" :key="i">Item 2-{{ i }}</ui-nav-item>
  </ui-nav>
</ui-list-group>

See List docs for detail

@Kestami
Copy link
Author

Kestami commented Oct 28, 2021

@elf-mouse Thanks : ) using the above and the docs, managed to tweak it to something that works. For some reason when using ui-list-group as above I was getting an error when my drawer expanded saying it required at least one child that was focusable. I changed iu-list-group to just ui-list and it seemed to fix it!

@Kestami Kestami closed this as completed Oct 28, 2021
@elf-mouse
Copy link
Member

elf-mouse commented Oct 29, 2021

Hi @Kestami,

About "Uncaught Error: FocusTrap: Element must have at least one focusable child."

It's Google MDC drawer component focus management standard.

A simple solution, add one link, like this:

<ui-drawer type="modal">
  <ui-drawer-header>
    <ui-drawer-title>
      <a>Title</a>
    </ui-drawer-title>
  </ui-drawer-header>
  <ui-drawer-content>
    ...
  </ui-drawer-content>
</ui-drawer>

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

No branches or pull requests

2 participants