facebook / facebook/lexical

Feature: Add "setUndefinedWhenEmpty" option to the onchange plugin

Open
#4,980 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
23.9k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
55

Description

Right now, I have to manually check if the value is empty, which can be quite annoying. It would be nice if the onchange plugin had the checking built in and would just return undefined when empty.

The [isRootTextContentEmpty](https://lexical.dev/docs/api/modules/lexical_text#isroottextcontentempty) could probably be used for this

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.