From 539d39b9b8854570b271f52d44f7b2db7ebd3d69 Mon Sep 17 00:00:00 2001 From: "Shih-Chin, Lo" Date: Mon, 19 Feb 2024 16:42:00 +0800 Subject: [PATCH] handle checkboxList selected status --- src/RichToolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RichToolbar.js b/src/RichToolbar.js index d2d4ac1..cc70f1a 100755 --- a/src/RichToolbar.js +++ b/src/RichToolbar.js @@ -114,7 +114,7 @@ export default class RichToolbar extends Component { if (this.editor && items !== selectedItems) { this.setState({ items, - data: this.state.actions.map(action => ({action, selected: items.includes(action)})), + data: this.state.actions.map(action => ({action, selected: items.includes(action) || items.some(item => item && item.type === action)})), }); } }