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

Column title created from HTML element disappear after using Column/GridMenu Picker #1475

Closed
5 tasks done
ghiscoding opened this issue Apr 23, 2024 · 0 comments
Closed
5 tasks done

Comments

@ghiscoding
Copy link
Owner

Describe the bug

When the name property of a column definition is not a text but rather an HTML Element and then using a Column Picker or Grid Menu, the header title pulled from the name property is not being recreated properly

Reproduction

When using Column Picker or Grid Menu and unselecting any column from Example 16, the "Description" disappears completely.

this.columnDefinitions = [{
   // `name` can be a DOM element with a `title` to use as tooltip text
   id: 'desc', name: createDomElement('span', { title: 'custom title tooltip text', textContent: 'Description' }), field: 'description'
}];

msedge_G9xGef5KxH

Which Framework are you using?

Vanilla / Plain JS

Environment Info

| Executable          | Version |
| ------------------- | ------- |
| (framework used)    | VERSION |
| Slickgrid-Universal | VERSION |
| TypeScript          | VERSION |
| Browser(s)          | VERSION |
| System OS           | VERSION |

Validations

ghiscoding added a commit that referenced this issue Apr 24, 2024


- when unselecting any column from ColumnPicker/GridMenu it was causing columns created from native HTML element to disappear, I'm not exactly sure why but it looks like if I clone the node before calling `.appendChild` then the problem no longer exists. For reference, the issue is from these lines
https://github.com/ghiscoding/slickgrid-universal/blob/185b6f9e44400bec2f1d79568905ca79e4b338a5/packages/common/src/core/slickGrid.ts#L1615-L1616
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