2023-06-09
Patch Changes
-
68f4011: Fix partial matches when using mention atoms, where support characters include whitespace.
Exposed a new option
replacementType
in theuseMentionAtom
hook. This allows you to replace the match up to where the cursor is placed, rather than the entire match.const { state, getMenuProps, getItemProps, indexIsHovered, indexIsSelected } = useMentionAtom({ items, replacementType: 'partial', // <-- Here });
This is of particular use if your mention atoms include whitespace. Instead of replacing the remainder of the text in a line, it will only replace up to the cursor.
-
Updated dependencies [68f4011]
-
Updated dependencies [68f4011]
- @remirror/react-hooks@2.0.24
- @remirror/react-components@2.1.13