Skip to content

Commit

Permalink
Merge pull request #9009 from infor-design/1791-add-guard
Browse files Browse the repository at this point in the history
1791 - Add guards on datagrid filter tooltip
  • Loading branch information
tmcconechy authored Sep 9, 2024
2 parents 3cd6187 + e0e109b commit e48ff3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

- `[Autocomplete]` Fixed a bug where autocomplete items are not shown when press key down. ([#8943](https://github.com/infor-design/enterprise-/issues/8943))
- `[ContextualToolbar]` Fixed datagrid hover color for contextual toolbar when a row is selected. ([#8980](https://github.com/infor-design/enterprise-/issues/8980))
- `[Datagrid]` Fixed a bug where filters would error in some cases in an angular app. ([#1791](https://github.com/infor-design/enterprise-ng/issues/1791))
- `[Datagrid]` Fixed a bug in compact mode where datagrid filters doesn't extend all throughout the parents width. ([#8900](https://github.com/infor-design/enterprise-/issues/8900))
- `[Datagrid]` Fixed data return by select event on datagrid when having filter on. ([#8905](https://github.com/infor-design/enterprise/issues/8905))
- `[Datagrid]` Optimize the initial loading of datagrids with filterable setting. ([#8935](https://github.com/infor-design/enterprise/issues/8935))
Expand Down
6 changes: 3 additions & 3 deletions src/components/datagrid/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -13566,16 +13566,16 @@ Datagrid.prototype = {

tooltip.content = xssUtils.stripHTML(iconTooltipContent);
tooltip.headerText = xssUtils.stripHTML(headerText);
} else {
} else if (tooltip) {
// Default use wrapper content
if (tooltip.wrapper.querySelector('.datagrid-expand-btn')) {
if (tooltip?.wrapper?.querySelector('.datagrid-expand-btn')) {
Array.prototype.filter
.call(tooltip.wrapper.children, node => !node.matches('.datagrid-expand-btn'))
.forEach((node) => {
tooltip.content = node.textContent;
});
} else {
tooltip.content = tooltip.wrapper.textContent;
tooltip.content = tooltip.wrapper?.textContent;
}
tooltip.content = xssUtils.stripHTML(tooltip.content).trim();
}
Expand Down

0 comments on commit e48ff3e

Please sign in to comment.