shlomiassaf / ngrid

A angular grid for the enterprise

Home Page:https://shlomiassaf.github.io/ngrid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

on Demo: Cannot restore columns after hiding

ayeletdn opened this issue · comments

What is the expected behavior?

All hidden columns should re-appear.

What is the current behavior?

There is no restore hidden columns.

What are the steps to reproduce?

  • Browse to https://shlomiassaf.github.io/ngrid/
  • Click on any column menu icon (tried with email, country, feedback)
  • Select "Hide Column"
  • Result -> Column is hidden
  • Click on the upper menu icon (two arrows)
  • Select "Restore Columns"
  • Result -> Nothing happens

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

Version indicated on the page: Version 1.0.0-rc.9 using angular 8.2.2 and cdk 8.1.3 (hash: 2fef015)

Is there anything else we should know?

Hi, Thanks for the info!

The "restore column" will actually restore the order of the columns but it will not change their hidden state.

I can see now that it's confusing, i'll fix that.

Thank you

Thanks for the quick response.
I'm still a little confused - how would you restore a column that's been previously hidden?

The hidden state is not part of the column, i.e. hidden is not a metadata of the column instance.

Instead, an array with column id's is used through binding to control the hidden state and the user provides it to the component.

When restore is clicked i'm not cleaning that array so this is why an hidden array is still hidden.

The restore is only "restoring" column order and width's to the original definition.

You can read more about hidden here