Merge pull request #354 from devchat-ai/fix-chatmark-ui
Fix state management in ChatMark component
This commit is contained in:
commit
2548b8d8d3
@ -148,7 +148,7 @@ const ChatMark = ({ children,value,messageDone }) => {
|
|||||||
id,
|
id,
|
||||||
title,
|
title,
|
||||||
type:'checkbox',
|
type:'checkbox',
|
||||||
value: disabled?'unchecked':status === 'x'?'checked':'unchecked',
|
value: status === 'x'?'checked':'unchecked',
|
||||||
});
|
});
|
||||||
setAutoForm(true);
|
setAutoForm(true);
|
||||||
} else if (match = line.match(radioRegex)) {
|
} else if (match = line.match(radioRegex)) {
|
||||||
@ -180,7 +180,7 @@ const ChatMark = ({ children,value,messageDone }) => {
|
|||||||
editorContentRecorder = editorContentRecorder.substring(0, editorContentRecorder.length - 1);
|
editorContentRecorder = editorContentRecorder.substring(0, editorContentRecorder.length - 1);
|
||||||
// apply editor content to widget
|
// apply editor content to widget
|
||||||
((editorId,editorContent) => widgetsHandlers.apply((item)=>{
|
((editorId,editorContent) => widgetsHandlers.apply((item)=>{
|
||||||
if(item.id === editorId && !disabled){
|
if(item.id === editorId){
|
||||||
item.value = editorContent;
|
item.value = editorContent;
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user