File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/client/components/ChatV2 Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { TextField , Typography } from '@mui/material'
2
2
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff'
3
+ import { useEffect } from 'react'
3
4
4
5
const VisibilityOff = ( ) => (
5
6
< div style = { { display : 'flex' , alignItems : 'center' } } >
@@ -25,6 +26,9 @@ export default function AssistantInstructionsInput({
25
26
setInstructions : ( instructions : string ) => void
26
27
instructionsInputFieldRef : any
27
28
} ) : JSX . Element {
29
+ useEffect ( ( ) => {
30
+ instructionsInputFieldRef . current . value = instructions //this change will be seen since the assistantInstructions is also updated
31
+ } , [ instructions ] )
28
32
return hidden ? (
29
33
< TextField disabled = { true } label = { < VisibilityOff /> } />
30
34
) : (
You can’t perform that action at this time.
0 commit comments