akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 878 forks source link

Does 'hide' for column work dynamically? #1311

Open dextersy opened 2 years ago

dextersy commented 2 years ago

I'm trying to show and hide certain columns dynamically and I thought it would be possible to do that by changing the "hide" setting to true or false, like so:

public toggleCheckColumns(display: boolean) {
    console.log("Toggle check columns = " + display);
    this.settings.columns["bankName"].hide = !display;
  }

However, it doesn't seem to do anything. Am I missing something?

maximLyakhov commented 2 years ago

@dextersy you can iterate over your settings object, copy it and substitute with desired config.