mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 13:01:14 +03:00
update dialog position, and clear feedback content after dialog disappear
This commit is contained in:
@@ -27,7 +27,10 @@ const ChatFeedbackContentDialog = ({ show, onCancel, onConfirm }) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (show) dispatch({ type: SHOW_CANVAS_DIALOG })
|
if (show) dispatch({ type: SHOW_CANVAS_DIALOG })
|
||||||
else dispatch({ type: HIDE_CANVAS_DIALOG })
|
else dispatch({ type: HIDE_CANVAS_DIALOG })
|
||||||
return () => dispatch({ type: HIDE_CANVAS_DIALOG })
|
return () => {
|
||||||
|
dispatch({ type: HIDE_CANVAS_DIALOG })
|
||||||
|
setFeedbackContent('')
|
||||||
|
}
|
||||||
}, [show, dispatch])
|
}, [show, dispatch])
|
||||||
|
|
||||||
const component = show ? (
|
const component = show ? (
|
||||||
|
|||||||
@@ -871,11 +871,6 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Box>
|
</Box>
|
||||||
<ChatFeedbackContentDialog
|
|
||||||
show={showFeedbackContentDialog}
|
|
||||||
onCancel={() => setShowFeedbackContentDialog(false)}
|
|
||||||
onConfirm={submitFeedbackContent}
|
|
||||||
/>
|
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
{message.fileAnnotations && (
|
{message.fileAnnotations && (
|
||||||
@@ -1124,6 +1119,11 @@ export const ChatMessage = ({ open, chatflowid, isDialog, previews, setPreviews
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<SourceDocDialog show={sourceDialogOpen} dialogProps={sourceDialogProps} onCancel={() => setSourceDialogOpen(false)} />
|
<SourceDocDialog show={sourceDialogOpen} dialogProps={sourceDialogProps} onCancel={() => setSourceDialogOpen(false)} />
|
||||||
|
<ChatFeedbackContentDialog
|
||||||
|
show={showFeedbackContentDialog}
|
||||||
|
onCancel={() => setShowFeedbackContentDialog(false)}
|
||||||
|
onConfirm={submitFeedbackContent}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user