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

Empty div doesn't go away after adding nodes #104

Open
hareluya86 opened this issue Mar 26, 2018 · 0 comments
Open

Empty div doesn't go away after adding nodes #104

hareluya86 opened this issue Mar 26, 2018 · 0 comments

Comments

@hareluya86
Copy link

hareluya86 commented Mar 26, 2018

Using $('.dd').nestable('add', jsonObj) on an empty initial container like

<div id="selections_nested" class="col-md-6">
    <ol class="dd-list"></ol>
</div>

will produce an empty div <div class="dd-empty"/> remaining regardless of how many nodes I've add. This empty div was initiated but should be removed when new nodes are added and the tree is no longer empty.

I have added a line in 251 to check if the the tree contains an empty div and remove it if it exists:

if(tree.find('.'+this.options.emptyClass))
    this.removeEmptyElement(this.el);

Let me know if this is a good fix or is there any better way.

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