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
I'm trying to do a dynamic pinning by toggling frozenLeft property in column inputs dynamically.
it works but I have to resize the window in-order for this to be updated
Expected behavior
pinning and unpinning the column dynamically
Reproduction of the problem
Create a button the toggles the frozenLeft property of a certain column, it won't be pinned (updated) until you resize the window.
What is the motivation / use case for changing the behavior?
More options for the user
Please tell us about your environment:
Table version: 0.7.x
Angular version: 2.0.x
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
UPDATE:
It works but ..
I have to do a resize for the window or something in order for this to work
@JosephSKh did you found a solution?
Where you able to call recalculate from your app?
I opened this issue which is similar #529 and also this is similar #533
@mburger81 not yet, it's a complete mess when it comes to dynamic columns, dynamic pinning and toggling.
@JosephSKh yea it seems so, dynamic columns for now are not really usable, I tried to debug but it's perhaps a little bit complicated for someone external of the project
@mburger81
I've worked on this over the weekend, and eventually reworked the data-flow for the columns in the datatable.
Since this has quite an impact, i'd like to have some more real world tests to see if it works before I submit it as a pull-request.
The branch can be found here: https://github.com/gerhardboer/nxg-datatable/tree/data-flow-reorder
@gerhardboer
A lot of code changed in your branch, I'm happy to test it also in real world for you. Are you able to release a npm nightly package or something similar to test it on the fly without have to build it for my own?
I'm not able to build your branch to include it in angular2.
I could add a .tgz release to the repository which is installable.
This would have to wait for a few hours though until i'm done with work... should be 3/4 hours.
I'll let you know!
Okay, as you like!
@gerhardboer - Make a PR and lets start looking over things :)
@amcdnl
I'll create a pull-request for this change tonight (+- 6 hours from now).
We can discuss the changes and maybe try another attempt at onPush from there :)
Any news about this one?
At the moment I'm using a workaround where I have to toggle the display of the table with a slight delay of 100ms. Not the most elegant way... ;)
Any news on that?
any update on this issue?
same here...
our temp workaround, after setting frozenLeft/frozenRight property, we reassign the columns in order to force width calculation:
(on component)
this.table.columns = this.table._internalColumns;
Most helpful comment
@amcdnl
I'll create a pull-request for this change tonight (+- 6 hours from now).
We can discuss the changes and maybe try another attempt at onPush from there :)