mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: required validation not working after deleting data in rich text editor (#6006)
This commit is contained in:
parent
35238cc02e
commit
5ce5b05cb6
@ -45,7 +45,13 @@ export const RichText = connect(
|
||||
modules={modules}
|
||||
formats={formats}
|
||||
value={resultValue}
|
||||
onChange={onChange}
|
||||
onChange={(value) => {
|
||||
if (value === '<p><br></p>') {
|
||||
onChange(undefined);
|
||||
} else {
|
||||
onChange(value);
|
||||
}
|
||||
}}
|
||||
readOnly={disabled}
|
||||
/>,
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user