We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d95e5a0 commit 78573e4Copy full SHA for 78573e4
1 file changed
src/components/mention-input.tsx
@@ -160,7 +160,18 @@ export default function MentionInput({
160
?.flatMap(({ content }) => {
161
return content
162
?.filter((v) => v.type == "mention")
163
- .map((v) => v.attrs);
+ .map(
164
+ (v) =>
165
+ (
166
+ v as {
167
+ type: "mention";
168
+ attrs: {
169
+ id: string;
170
+ label: string;
171
+ };
172
+ }
173
+ ).attrs,
174
+ );
175
})
176
.filter(Boolean) as { label: string; id: string }[];
177
latestContent.current = {
@@ -169,7 +180,7 @@ export default function MentionInput({
180
};
181
onChange?.({
182
json,
- text,
183
+ text: text.trim(),
184
mentions,
185
});
186
},
0 commit comments