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

[table] hideColumn and showColumn don't update hidden property in column configuration #623

Open
eliganemtyler opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eliganemtyler
Copy link
Contributor

Describe the bug:
The forge TableComponent hideColumn and showColumn methods don't update the hidden property of the columnConfiguration

To Reproduce:
Steps to reproduce the behavior:

  1. Go to the forge demo app table page
  2. In pages/table.ts set the hidden property of one columnConfiguration to true
  3. Add a "show" button, "hide" button, and "log" button to table.ejs
  4. Add event listeners to each button to show the hidden column, hide a visible column, and console.log(table.columnConfigurations respectively
  5. Hit each button
  6. In the console, the shown column has a hidden: true and the hidden column has hidden undefined.

Expected behavior:
The hideColumn and showColumn methods should update the columnConfiguration hidden properties.

Please complete the following information:

  • Forge version: 2.24.1
  • I have searched existing issues before creating this report? Y
  • Browser: All
  • Platform: All
  • OS: All

Additional context:
You often use the hidden value of a columnConfiguration to filter out hidden columns in cases like using the ITableFilterEventData columnIndex value to get the matching visible columnConfiguration. The event data columnIndex correctly updates both when columns are hidden/shown by setting columnConfiguration.hidden manually or via hideColumn/showColumn, but there's no way to match columnIndex to the visible column in the latter case because the hidden property isn't updated.

@eliganemtyler eliganemtyler added the bug Something isn't working label Jun 7, 2024
@eliganemtyler eliganemtyler changed the title [table] hideColumn and showColumn don't add hidden property to column configuration [table] hideColumn and showColumn don't update hidden property in column configuration Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant