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

Unable to get property 'parents' of undefined or null reference #8

Open
KevinDuganJr opened this issue Nov 24, 2015 · 3 comments
Open

Comments

@KevinDuganJr
Copy link

Using IE11 and Chrome (Version 46.0.2490.86 m) and the Expand All, Collapse All button the console returns "Unable to get property 'parents' of undefined or null reference".

     <div class="well">
         <a href="javascript:void(0);" class="btn btn-primary act-button-expand-all ">+ Expand All</a>
         <a href="javascript:void(0);" class="btn btn-primary act-button-collapse-all">- Collapse All</a>
     </div>
@cemeyer2
Copy link

I actually ran into this issue this morning. It looks like when e0c6e4d was pushed the signature of the _collaptable was changed but not all references that invoke it.

Here was the fix I did, if the original author would like a PR, i can open one up: https://github.com/cemeyer2/aCollapTable

Note that now to support multiple tables on a given page, I passed in a table id on the expand all, such as:

<a href="javascript:void(0);" class="act-button-expand-all" data-table-id="foo_table_id">
...

@bt209
Copy link

bt209 commented Apr 17, 2017

The above did not work for me. The fix above no longer generated the error "Unable to get property 'parents' of undefined or null reference", and instead was just swapping the "+" and "-" and not collapsing or expanding the table.
What i ended up doing is adding the'$table' as a parameter to the two calls to '_collaptable' from the collapse all expand all buttons for the click event, which is identical to what the '.act-button-expand' was doing.
Previous: _collaptable($('.act-more', $(item)));
New: _collaptable($table, $('.act-more', $(item)));

@rohitcsa
Copy link

rohitcsa commented Jun 8, 2017

when i create collaptable through servlet using databse connection the data-parent should be "null" but in this tool the first data-parent is "". how it can be resolve.
thank you.

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

4 participants