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

Reordering columns throws an exception and no further operation can be performed on the grid #438

Closed
emonney opened this issue Jan 19, 2017 · 9 comments

Comments

@emonney
Copy link

emonney commented Jan 19, 2017

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

Immediately after a column is reordered, the exception "./DataTableHeaderComponent class DataTableHeaderComponent - inline template:7:8 caused by: object unsubscribed" is thrown and no further operation (such as column reordering, sorting) can be performed on the grid

Expected behavior

Sorting, reordering, all feature set should continue to work

Reproduction of the problem

Go to the demo application (happens in local version too) and drag and reorder any column. After reordering no further sorting or re ordering can be done

What is the motivation / use case for changing the behavior?

The grid should not stop working after a standard operation. It only works again until the entire page is reloaded

Please tell us about your environment:

  • Table version: 5.0.0
  • Angular version: 2.4.3
  • Browser: [chrome | firefox | MS Edge]
@emonney
Copy link
Author

emonney commented Jan 23, 2017

@amcdnl Issue doesn't seem to be related to reordering only. Sorting also randomly throws the same exception: "./DataTableHeaderComponent class DataTableHeaderComponent - inline template:7:8 caused by: object unsubscribed" and brings the entire application down.
Disabling reordering doesn't mitigate this.

@amcdnl
Copy link
Contributor

amcdnl commented Jan 24, 2017

Can you make a demo?

@emonney
Copy link
Author

emonney commented Jan 25, 2017

The online demo here: http://swimlane.github.io/ngx-datatable/.
Try to reorder the columns. It only works the first time (Then throws error => Check console for error). After that everything else stops working.

@amcdnl
Copy link
Contributor

amcdnl commented Jan 25, 2017

Fixed :)

@amcdnl amcdnl closed this as completed Jan 25, 2017
@emonney
Copy link
Author

emonney commented Jan 25, 2017

:D

amcdnl added a commit that referenced this issue Jan 25, 2017
@emonney
Copy link
Author

emonney commented Jan 26, 2017

Resolved. Thnx!

@rotemx
Copy link

rotemx commented Feb 2, 2017

@amcdnl
ngx-bug
I'm still having an issue when removing a column and them restoring it, and then doing it again, and on the second time i'm restoring it I'm getting an "object unsubscribed" error.
I'm using version 6.0.2 with angular 2.4.5.
any ideas ?
thanks

irackley-mc pushed a commit to memberclicks/ui-ngx-datatable that referenced this issue Feb 8, 2017
@guslep
Copy link

guslep commented Feb 9, 2017

@rotemx I have the same problem as you
Easy step to reproduce
In the demo app -> column-toggle.ts
replace this.columns = [...this.columns, col];
by this.columns = this.allColumns;

Once the app is loaded try to toggle the Name Coulmn, the first untoggle/toggle works
but if you try to re untoggle/toggle than it breaks

There is no problem if you are adding the column ad the end though

@amcdnl
Copy link
Contributor

amcdnl commented Feb 13, 2017

I think this has been resolved. I'm about to do a new build and can you retest?

rsparrow pushed a commit to rsparrow/ngx-datatable that referenced this issue Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants