swarm-ui: a todo switched from clear to upsert drops its prefix flag
This commit is contained in:
parent
06f3e76329
commit
fb8aa23e66
1 changed files with 34 additions and 12 deletions
|
|
@ -16,6 +16,7 @@ import {
|
|||
replaceNode,
|
||||
type Edit,
|
||||
type Limits,
|
||||
withOp,
|
||||
} from "./FlowDraft.js";
|
||||
import {
|
||||
kindValues,
|
||||
|
|
@ -237,14 +238,7 @@ function TodoFields({
|
|||
label="op"
|
||||
value={node.op}
|
||||
options={opList}
|
||||
onChange={(op) =>
|
||||
onChange({
|
||||
...node,
|
||||
op: op as TodoNode["op"],
|
||||
// A clear carries no text.
|
||||
text: op === "clear" ? "" : node.text,
|
||||
})
|
||||
}
|
||||
onChange={(op) => onChange(withOp(node, op as TodoNode["op"]))}
|
||||
/>
|
||||
<SelectField
|
||||
id={`${keyPrefix}-to-kind`}
|
||||
|
|
|
|||
Loading…
Reference in a new issue