Skip to content

fix(richtext-lexical): allow to indent and outdent if at least one selected node allows it #12182

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

Merged

Conversation

tak-amboss
Copy link
Contributor

What?

Enables the indent/outdent button if at least one selected node can be indented/outdented.

Why?

Before, the buttons were disabled e.g. if multiple nodes were selected of which one was not indentable/outdentable or if a child node was not indentable but the parent was, leading to inconsistent behavior.

How?

Checks if the node itself or any parent fulfills the criteria. The change affects only the buttons active state, not the actual indentation logic.

Fixes #12042

@tak-amboss tak-amboss changed the title fix(lexical): allow to indent and outdent if at least one selected node allows it fix(richtext-lexical): allow to indent and outdent if at least one selected node allows it Apr 22, 2025
Copy link
Contributor

@GermanJablo GermanJablo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@GermanJablo GermanJablo merged commit 9b1dd2a into payloadcms:main Apr 23, 2025
82 of 83 checks passed
Copy link
Contributor

🚀 This is included in version v3.36.0

kendelljoseph pushed a commit that referenced this pull request May 15, 2025
…lected node allows it (#12182)

### What?
Enables the indent/outdent button if at least one selected node can be
indented/outdented.

### Why?
Before, the buttons were disabled e.g. if multiple nodes were selected
of which one was not indentable/outdentable or if a child node was not
indentable but the parent was, leading to inconsistent behavior.

### How?
Checks if the node itself or any parent fulfills the criteria. The
change affects only the buttons active state, not the actual indentation
logic.

Fixes #12042
kendelljoseph pushed a commit that referenced this pull request May 19, 2025
…lected node allows it (#12182)

### What?
Enables the indent/outdent button if at least one selected node can be
indented/outdented.

### Why?
Before, the buttons were disabled e.g. if multiple nodes were selected
of which one was not indentable/outdentable or if a child node was not
indentable but the parent was, leading to inconsistent behavior.

### How?
Checks if the node itself or any parent fulfills the criteria. The
change affects only the buttons active state, not the actual indentation
logic.

Fixes #12042
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants