mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
remove label length validation and string value validation
This commit is contained in:
@@ -19,12 +19,6 @@ export default function ConditionModal({
|
||||
setModal(EMPTY_STATE);
|
||||
};
|
||||
const handleAdd = () => {
|
||||
const labelIsEmpty = Boolean(modal.condition.label.length === 0);
|
||||
const stringValueIsEmpty = Boolean(
|
||||
modal.condition.type === "string" && modal.condition.value.length === 0
|
||||
);
|
||||
const validation = Boolean(labelIsEmpty || stringValueIsEmpty);
|
||||
if (validation) return;
|
||||
function setConditionHack(type, condition) {
|
||||
let rCondition = condition;
|
||||
if (type === "undefined") rCondition = { ...condition, value: undefined };
|
||||
|
||||
@@ -9,7 +9,6 @@ export default function ConditionModalContent({
|
||||
handleUpdate,
|
||||
}: any) {
|
||||
const { label, operator, type, value } = condition;
|
||||
const labelReqLen = Boolean(condition.label.length < 1);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -75,7 +74,6 @@ export default function ConditionModalContent({
|
||||
/>
|
||||
)}
|
||||
<TextField
|
||||
error={labelReqLen}
|
||||
value={label}
|
||||
label="Label"
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user