Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore (keydown): improve behaviour of getOutOfList #100

Merged
merged 9 commits into from
Nov 2, 2024

Conversation

e11sy
Copy link

@e11sy e11sy commented Nov 2, 2024

Problem

  1. After splitting of the list on first item we get two lists. One of them is empty (even no item, so just empty wrapper with paddings is left)
  2. After pressing backspace at start of the first item, we should convert first item of the list to the paragraph

Solution

  • Added removeBlock parameter to the getOutOfList() method, that represents condition, when List block should be removed after getting out
  • Added getOutOfListFromFirstItem() method, that unshifts child items of the first element, and calls getOutOfList with right conditions

src/ListTabulator/index.ts Outdated Show resolved Hide resolved
@e11sy e11sy merged commit e0544a7 into release/2.0 Nov 2, 2024
1 check passed
@e11sy e11sy deleted the backspace-in-first-item branch November 2, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants