So, the right data is loaded into columns, but somehow overridden in displayedColumns. Seems like this could be a timing issue with the BehaviorSubject in the init function.
My temporary workaround is, to set the displayedColumns manually, directly after calling the constructor of TableData.
I tried the following TableData initialization.
On the initial call the output looks like this. For columns:
For displayedColumns:
Then I hide column 'C2' in the UI and the settings are stored to the local storage:
Looks good. Now when the constructor is called again, the column is still in the displayedColumns. Same constructor call (without any 'isActive').
For columns:
For displayedColumns:
So, the right data is loaded into columns, but somehow overridden in displayedColumns. Seems like this could be a timing issue with the BehaviorSubject in the init function.
My temporary workaround is, to set the displayedColumns manually, directly after calling the constructor of TableData.