Skip to content

Commit 543de30

Browse files
committed
feat: example app update
1 parent 7eb3c09 commit 543de30

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/example-web/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ function App() {
123123

124124
const handleUserMentionSelected = (item: MentionItem) => {
125125
ref.current?.setMention('@', `@${item.name}`, {
126-
id: item.id,
127-
type: 'user',
126+
'id': item.id,
127+
'data-type': 'user',
128128
});
129129
closeUserMentionPopup();
130130
};
131131

132132
const handleChannelMentionSelected = (item: MentionItem) => {
133133
ref.current?.setMention('#', `#${item.name}`, {
134-
id: item.id,
135-
type: 'channel',
134+
'id': item.id,
135+
'data-type': 'channel',
136136
});
137137
closeChannelMentionPopup();
138138
};

src/web/sanitization/htmlSanitizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function checkMentionAttributes(attributes?: Record<string, string>) {
5656
}
5757
console.warn(
5858
`[EnrichedMention] Attribute "${attrName}" on the <mention> tag may be removed during sanitization. ` +
59-
`Consider using the "data-" prefix for custom data attributes (e.g., "data-${attrName}").`
59+
`Consider using the "data-" prefix for custom data attributes.`
6060
);
6161
});
6262
}

0 commit comments

Comments
 (0)