1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-21 12:34:19 +00:00

🐛 Fix conditions not able to be deleted

This commit is contained in:
Steffo 2021-05-30 16:46:21 +02:00
parent ab82f66073
commit a25e3ba223
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -32,14 +32,14 @@ export default function RepositoryEditor({
const [_name, setName] = useState(name ?? "")
/** The conditions of the data gathering. */
const parsedConditions = conditions.map(cond => Condition.fromRaw(cond))
const {
value: rawConditions,
value: _conditions,
setValue: setRawConditions,
appendValue: appendRawCondition,
removeValue: removeRawCondition,
spliceValue: spliceRawCondition,
} = useArrayState(conditions)
const _conditions = rawConditions.map(cond => Condition.fromRaw(cond))
} = useArrayState(parsedConditions)
/** The operator the conditions should be evaluated with. */
const [_evaluationMode, setEvaluationMode] = useState(evaluationMode ?? 0)