forked from Kieran/snort
deactivate when cleaning input field
This commit is contained in:
parent
4f5d07ecd9
commit
846909536d
@ -47,6 +47,16 @@ export function NoteCreator(props) {
|
||||
}
|
||||
}
|
||||
|
||||
function onChange(ev) {
|
||||
const { value } = ev.target
|
||||
if (value) {
|
||||
setNote(value)
|
||||
setActive(true)
|
||||
} else {
|
||||
setActive(false)
|
||||
}
|
||||
}
|
||||
|
||||
if (!show) return false;
|
||||
return (
|
||||
<>
|
||||
@ -56,7 +66,7 @@ export function NoteCreator(props) {
|
||||
<Textarea
|
||||
className={`textarea ${active ? "textarea--focused" : ""}`}
|
||||
users={users}
|
||||
onChange={(ev) => setNote(ev.target.value)}
|
||||
onChange={onChange}
|
||||
onFocus={() => setActive(true)}
|
||||
/>
|
||||
<div className="actions flex f-row">
|
||||
|
@ -1,10 +1,5 @@
|
||||
.rta {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.rta__entity {
|
||||
background: var(--gray);
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.rta__entity--selected {
|
||||
|
Loading…
Reference in New Issue
Block a user