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;
|
if (!show) return false;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@ -56,7 +66,7 @@ export function NoteCreator(props) {
|
|||||||
<Textarea
|
<Textarea
|
||||||
className={`textarea ${active ? "textarea--focused" : ""}`}
|
className={`textarea ${active ? "textarea--focused" : ""}`}
|
||||||
users={users}
|
users={users}
|
||||||
onChange={(ev) => setNote(ev.target.value)}
|
onChange={onChange}
|
||||||
onFocus={() => setActive(true)}
|
onFocus={() => setActive(true)}
|
||||||
/>
|
/>
|
||||||
<div className="actions flex f-row">
|
<div className="actions flex f-row">
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
.rta {
|
|
||||||
overflow: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rta__entity {
|
.rta__entity {
|
||||||
background: var(--gray);
|
background: var(--gray);
|
||||||
padding: 4px 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rta__entity--selected {
|
.rta__entity--selected {
|
||||||
|
Loading…
Reference in New Issue
Block a user