🔧 chore(genericModal/index.tsx): refactor useEffect hook to set input value when 'value' prop changes
This commit is contained in:
parent
f67c0ff509
commit
19b874b591
1 changed files with 6 additions and 0 deletions
|
|
@ -96,6 +96,12 @@ export default function GenericModal({
|
|||
}
|
||||
}, [inputValue, type]);
|
||||
|
||||
useEffect(() => {
|
||||
setInputValue(value)
|
||||
}, [value])
|
||||
|
||||
|
||||
|
||||
const coloredContent = (inputValue || "")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue