Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Focus the newly created Slate Table block
Browse files Browse the repository at this point in the history
  • Loading branch information
silviubogan committed Aug 10, 2020
1 parent 035cf27 commit cfe04eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/editor/plugins/Table/TableButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ const TableButton = () => {
onChangeBlock,
onAddBlock,
index,
onFocusNextBlock,
block,
blockNode,
} = editor.getBlockProps();

const rows = [];
Expand All @@ -120,7 +123,8 @@ const TableButton = () => {
onChangeBlock,
onAddBlock,
}).then(() => {
// TODO: focus the new Slate Table block
// blockNode is a ref
onFocusNextBlock(block, blockNode.current);
});
}}
/>
Expand Down

0 comments on commit cfe04eb

Please sign in to comment.