Skip to content

Commit

Permalink
[core] Comment on CSS.escape for the future
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed May 31, 2024
1 parent 70090bf commit ed3472b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/x-data-grid/src/utils/domUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export function findParentElementFromClassName(elem: Element, className: string)
return elem.closest(`.${className}`);
}

// TODO, eventually replaces this function with CSS.escape, once available in jsdom, either added manually or built in
// https://github.com/jsdom/jsdom/issues/1550#issuecomment-236734471
export function escapeOperandAttributeSelector(operand: string): string {
return operand.replace(/["\\]/g, '\\$&');
}
Expand Down

0 comments on commit ed3472b

Please sign in to comment.