plate icon indicating copy to clipboard operation
plate copied to clipboard

insertTable doesn't put selection to the first cell

Open Feshchenko opened this issue 1 year ago • 1 comments

Description

After inserting a new table the focus or selection doesn't appear in the first cell. Line of code that is broken: https://github.com/udecode/plate/blob/main/packages/table/src/transforms/insertTable.ts#L58

Steps to Reproduce

  1. go to https://platejs.org/ or any example where the table button is present
  2. click on the insert button in the toolbar
  3. the editor is not focused, first cell is not focused

Sandbox

https://platejs.org/

Expected Behavior

First cell is selected after inserting the table

Environment

  • slate:
  • slate-react:
  • browser: chrome

Bounty

Click here to add a bounty via Algora.

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar

Feshchenko avatar Nov 15 '23 11:11 Feshchenko

Hey first time here , it does select the first item it just doesnt show the first few items , but if we scroll down the tabel is shown below and it works fine .

shivam109677 avatar Jan 02 '24 09:01 shivam109677