Skip to content

Commit 8e9d6cc

Browse files
committed
fix: onTrigger is not invoked as expected
1 parent f1df2ba commit 8e9d6cc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@coze-editor/react-components",
5+
"comment": "onTrigger is not invoked as expected",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@coze-editor/react-components",
10+
"email": "[email protected]"
11+
}

packages/text-editor/react-components/src/mention/react.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ function Mention(props: MentionOptions) {
2323
return propsRef.current.onSearch(...args);
2424
}
2525
},
26+
onTrigger(...args) {
27+
if (typeof propsRef.current.onTrigger === 'function') {
28+
return propsRef.current.onTrigger(...args);
29+
}
30+
},
2631
};
2732
return injector.inject([
2833
mention(

0 commit comments

Comments
 (0)