remove label length validation and string value validation

This commit is contained in:
Gibson Han
2022-02-07 15:54:19 +07:00
parent c0aa3a06b5
commit 618abf0252
2 changed files with 0 additions and 8 deletions

View File

@@ -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 };

View File

@@ -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