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

Ability to change columns #584

Open
1 of 2 tasks
gmixson opened this issue Feb 28, 2024 · 0 comments
Open
1 of 2 tasks

Ability to change columns #584

gmixson opened this issue Feb 28, 2024 · 0 comments

Comments

@gmixson
Copy link

gmixson commented Feb 28, 2024

I provide an array of ModelsTableColumnOptions to the component from a getter in my component class. When I change the output of the getter the columns displayed stay the same.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  • [Bug] What is the expected behavior?

  • [Feature] What is the motivation / use case for changing the behavior?

I would like to show/hide different columns based on user interaction that is not directly tied to the table. For example, I have a form that I use to determine which types of columns should be displayed.

A side effect would be an easy way to change the order of displayed columns.

  • [Support] What exactly you try to do?

  • Please tell us about your environment:

  • ember-models-table version: 5.2
  • ember version: 5.6
  • ember-data version: 5.3
  • ember-cli version: 5.6
  • node version: 18.15
  • npm or yarn version: 9.5
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

I believe this occurs because the _setupColumns function is only run from the constructor. One possible implementation would be to refactor the 'results' of _setupColumns such as this.processedColumns to be getters that depend on this.args.columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant