This is a migrated thread and some comments may be shown as answers.

Column header menu closes when hiding columns but not showing them

1 Answer 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 23 Jul 2020, 05:18 PM

See https://angular-dxxw7p-hthub5.stackblitz.io for a simplified example

I've customized the grid column header kebab menu using kendoGridColumnMenuTemplate - it's pretty close to the default column selector except that there is a reset button that restores the original hidden state for each column.

What I'm seeing is that the menu closes when you hide a column but doesn't close when one is added.  How can I cause this menu to persist while the user performs any number of column selection actions?

1 Answer, 1 is accepted

Sort by
0
Accepted
Svet
Telerik team
answered on 27 Jul 2020, 11:29 AM

Hi Ed,

Thank you for the provided example.

I managed to see the reported behavior. I understand that this may be disappointing, but at the moment the implementation design of the column menu doesn't allow to achieve the requirement. What could be done as a workaround is to use the ColumnChooser component where its [autoSync] option is set to true as demonstrated in the following example:

https://stackblitz.com/edit/angular-eyipjd?file=app%2Fapp.component.ts

But if the Column chooser is used inside a column header then the requirement wouldn't be as required due to the position of the element that the column menu is attached to being changed when hiding/showing columns:

https://stackblitz.com/edit/angular-69z3cg-yvkk8n?file=app/app.component.ts

To be more specific, when opening the popup of the "Foo" column and showing/hiding the "Bar" column the popup will remain open. But if the "Foo" column is hidden then the popup will be closed.

When opening the popup of the "Bar" column then the popup will be closed when adding or hiding any column as the anchor element where the popup is attached is being re-positioned.

Based on the provided feedback I have also opened a new feature request in our public Feedback Portal asking for an [autoSync] option of the ColumnMenuChooser component. Please support it by voting at the following link:

https://feedback.telerik.com/kendo-angular-ui/1477867-autosync-option-of-the-columnmenuchooser-component

Feel free to add any additional comments about the desired behavior under the feature request. Thank you.

Regards,
Svetlin
Progress Telerik

Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or