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

Frozen columns not synced after visibility changes #3345

Closed
HoganHu0520 opened this issue Jul 11, 2017 · 0 comments
Closed

Frozen columns not synced after visibility changes #3345

HoganHu0520 opened this issue Jul 11, 2017 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@HoganHu0520
Copy link

I have four columns a:frozen , b, c, d.

Init Table
a:Frozen b c d

After hide column c
a:Frozen a:Frozen b d

Now Code
`initColumns(): void {
this.columns = this.cols.toArray();

    if(this.scrollable) {
        this.scrollableColumns = [];
        this.cols.forEach((col) => {
            if(col.frozen) {
                this.frozenColumns = this.frozenColumns || [];
                this.frozenColumns.push(col);
            }
            else {
                this.scrollableColumns.push(col);
            }
        });
    }

    this.columnsChanged = true;
}`

Fixed Code
`initColumns(): void {
this.columns = this.cols.toArray();

    if(this.scrollable) {
        this.scrollableColumns = [];
        this.frozenColumns = [];
        this.cols.forEach((col) => {
            if(col.frozen) {
                this.frozenColumns.push(col);
            }
            else {
                this.scrollableColumns.push(col);
            }
        });
    }

    this.columnsChanged = true;
}`

I can't check in code.
I hope someone can check it in.

  • Angular version: 4.0.X
  • PrimeNG version: 4.0.3
  • 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 2.4 | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@cagataycivici cagataycivici self-assigned this Aug 23, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 23, 2017
@cagataycivici cagataycivici added this to the 4.1.4 milestone Aug 23, 2017
@cagataycivici cagataycivici changed the title Scrollable Datatable added extra frozen columns, when hide or show some columns. Frozen columns not synced after visibility changes Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants