1rosehip/jplist

jplist destroy

Opened this issue · 8 comments

Hello,

is there a way to destroy the jplist instance?

I have a page where users toggle between scroll and pagination.
if they click on pagination, I use jplist to show the results as a pagination format and if they click on scroll, i need to remove jplist to show the results with scroll bar.

thanks

i really need help on this.
i've been trying to figure this out for the past few weeks, but the plugin is not working properly.

I empty jplist and add new items to it, but there is always data left over

Thanks

i really need a way to destroy and restore the list items back on the page.
i really want to use this plugin, but if this is not possible, i will not be able to use this plugin for my use case above.

thanks

Hello,
There are some known issues with destroy functionality in jplist.
Maybe you can consider show / hide instead of delete / restore?

i thought about that too, but the problem with that is when users switch from scroll view to pagination view (jplist), they may have changed data in scroll view, which i need to pass to the pagination control to display (destroy or refresh). on the other hand, if users change data on the pagination view, I need to get those items and show the changes on the scroll view. From my research so far, jplist saves the data internally and shows the data based on the page they are in. the problem with that is when users switch back to scroll view, the data on the page is incomplete because the data is being saved internally by jplist.

thank you for your response.

i actually spent a long time trying to refresh data using the command: empty, but it did not work for my use case above.

thanks

It's a bit difficult to help you without seeing the actual code. Please create your test case in jsFiddle, jsBin or other playground so I could investigate it.

I think I have the same problem. Calling .jplist(...) again on the same container to update the AJAX data source URL seems to confuse the paging and/or display old data?

I've tried:

  • command: 'empty'
  • data-control-storage="false" on the boostrap paging ul
  • data-jump-to-start="true" on the boostrap paging ul

This issue might be related? #256