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

Multi-Nested Lists - The First Example #261

Open
LordA98 opened this issue Feb 5, 2019 · 1 comment
Open

Multi-Nested Lists - The First Example #261

LordA98 opened this issue Feb 5, 2019 · 1 comment

Comments

@LordA98
Copy link

LordA98 commented Feb 5, 2019

This seems like a stupid question, but I can't seem to find anything helpful.

I've got a multi-nested list. I can't seem to drop items into lowest layer of the list. The structure I want is exactly the same as the first example on the website page (Site), directly under 'Features'.

I have tried to find the code for this example but I can't see it anywhere.

Does anyone know where it is? Or can anyone give me a simple example of how it's done? I'm not sure where I'm going wrong.

Every li has a child ol, but getting into the lowest layer doesn't work, and attempting to drop an li into an li item with no current children also doesn't work.

Thanks in advance,
Alex

@LordA98
Copy link
Author

LordA98 commented Feb 5, 2019

Apologies - the issue was related to Bootstrap and the list-group-item class. The ol cannot handle items with relative position, and was hence failing. Similar to this issue - Issue 247.

The solution:

HTML:

<ul class="list-group sortable">
    <li class="list-group-item no-position">
      First
      <ul class="list-group">
          <li class="list-group-item">

i.e. only the first child item has no-position added to it.

CSS:

.no-position:not(.dragged) {
    position: initial;
}

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

1 participant