Skip to content

Commit 6111b5c

Browse files
committed
fix: add missing xmlns attribute to div elem
Signed-off-by: Andres Correa Casablanca <castarco@coderspirit.xyz>
1 parent e70d80f commit 6111b5c

File tree

2 files changed

+535
-0
lines changed

2 files changed

+535
-0
lines changed

@beautiful-tree/react/src/BeautifulTree.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ export interface BeautifulTreeProps {
4242
readonly getEdgeClass?: CssClassesGetter | undefined
4343
}
4444

45+
declare module 'react' {
46+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
47+
interface HTMLAttributes<T> {
48+
xmlns?: string
49+
}
50+
}
51+
4552
function runClassesGetter(
4653
classesGetter?: CssClassesGetter | undefined,
4754
data?: Readonly<Record<string, unknown>> | undefined,
@@ -152,6 +159,7 @@ export function BeautifulTree({
152159
<div
153160
key={`${id}-node-div-${idx}`}
154161
className={`beautiful-tree-node-content${_nodeClass}`}
162+
xmlns="http://www.w3.org/1999/xhtml"
155163
>
156164
{getNodeContent(node.data)}
157165
</div>

0 commit comments

Comments
 (0)