Save on focusout not fucking keyup
This commit is contained in:
@@ -97,12 +97,17 @@ export const SignatureRules = () => {
|
|||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
value={r.regex}
|
value={r.regex}
|
||||||
onChange={e => handleUpdate(r.id, { regex: e.target.value })}
|
onChange={e => setRules(prev => prev.map(x => x.id === r.id ? { ...x, regex: e.target.value } : x))}
|
||||||
|
onBlur={e => handleUpdate(r.id, { regex: e.currentTarget.value })}
|
||||||
className="font-mono"
|
className="font-mono"
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="max-w-0">
|
<TableCell className="max-w-0">
|
||||||
<Input value={r.note} onChange={e => handleUpdate(r.id, { note: e.target.value })} />
|
<Input
|
||||||
|
value={r.note}
|
||||||
|
onChange={e => setRules(prev => prev.map(x => x.id === r.id ? { ...x, note: e.target.value } : x))}
|
||||||
|
onBlur={e => handleUpdate(r.id, { note: e.currentTarget.value })}
|
||||||
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className="text-right">
|
<TableCell className="text-right">
|
||||||
<Button variant="destructive" onClick={() => handleDelete(r.id)}>Delete</Button>
|
<Button variant="destructive" onClick={() => handleDelete(r.id)}>Delete</Button>
|
||||||
|
Reference in New Issue
Block a user