Skip to content

Commit

Permalink
fix(text): fix composition input and abc input trembly issue (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
pubuzhixing8 authored Aug 9, 2024
1 parent 24fc4a3 commit d7a683b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 41 deletions.
76 changes: 41 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
},
"private": true,
"dependencies": {
"@plait/common": "^0.62.0-next.7",
"@plait/core": "^0.62.0-next.7",
"@plait/draw": "^0.62.0-next.7",
"@plait/layouts": "^0.62.0-next.7",
"@plait/mind": "^0.62.0-next.7",
"@plait/text-plugins": "^0.62.0-next.7",
"@plait/common": "^0.64.8",
"@plait/core": "^0.64.8",
"@plait/draw": "^0.64.8",
"@plait/layouts": "^0.64.8",
"@plait/mind": "^0.64.8",
"@plait/text-plugins": "^0.64.8",
"@radix-ui/react-popover": "^1.0.3",
"ahooks": "^3.8.0",
"classnames": "^2.5.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/react-board/src/plugins/with-react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export const withReact = (board: PlaitBoard & PlaitTextBoard) => {
}, 0);
},
update: (updatedProps: Partial<TextProps>) => {
const hasUpdated = updatedProps && newProps && !Object.keys(updatedProps).every((key) => updatedProps[key as keyof TextProps] === newProps[key as keyof TextProps]);
if (!hasUpdated) {
return;
}
const readonly = ReactEditor.isReadOnly(currentEditor);
newProps = { ...newProps, ...updatedProps };
root.render(<Text {...newProps}></Text>);
Expand Down

0 comments on commit d7a683b

Please sign in to comment.