feat: keep new value within the reset function when user save new thread setting

This commit is contained in:
Faisal Amir 2024-01-03 10:42:36 +07:00
parent 2a90cac56d
commit 4c67e5021c

View File

@ -64,8 +64,6 @@ const Sidebar: React.FC = () => {
const componentDataRuntimeSetting = getConfigurationsData(modelRuntimeParams) const componentDataRuntimeSetting = getConfigurationsData(modelRuntimeParams)
const setThreadSettingFormUpdate = useSetAtom(threadSettingFormUpdateAtom) const setThreadSettingFormUpdate = useSetAtom(threadSettingFormUpdateAtom)
// console.log(componentDataRuntimeSetting)
const componentData = [ const componentData = [
...[ ...[
{ name: 'title', controllerData: { value: activeThread?.title } }, { name: 'title', controllerData: { value: activeThread?.title } },
@ -206,7 +204,7 @@ const Sidebar: React.FC = () => {
threadId, threadId,
filterChangedFormFields(values, form.formState.dirtyFields) filterChangedFormFields(values, form.formState.dirtyFields)
) )
form.reset() form.reset({}, { keepValues: true })
} }
} }