diff --git a/app/modules/Collection/AddField/index.tsx b/app/modules/Collection/AddField/index.tsx index 91a8c393..ab655e8e 100644 --- a/app/modules/Collection/AddField/index.tsx +++ b/app/modules/Collection/AddField/index.tsx @@ -453,6 +453,7 @@ export default function AddField({ propertyName, pageId, handleClose }: Props) { buttonText="Add Condition when Field is Visible" collection={collection} buttonWidth="fit" + dropDownPortal={true} /> {/* {["shortText", "longText", "ethAddress"].includes( type.value diff --git a/app/modules/Collection/Automation/SingleAutomation.tsx b/app/modules/Collection/Automation/SingleAutomation.tsx index d25ace24..44cad267 100644 --- a/app/modules/Collection/Automation/SingleAutomation.tsx +++ b/app/modules/Collection/Automation/SingleAutomation.tsx @@ -629,6 +629,7 @@ export default function SingleAutomation({ firstRowMessage="It is true that" buttonText="Add Condition" collection={collection} + dropDownPortal={false} /> diff --git a/app/modules/Collection/Common/AddConditions.tsx b/app/modules/Collection/Common/AddConditions.tsx index 40d51c1b..bf203968 100644 --- a/app/modules/Collection/Common/AddConditions.tsx +++ b/app/modules/Collection/Common/AddConditions.tsx @@ -13,6 +13,7 @@ type Props = { buttonText: string; firstRowMessage?: string; collection: CollectionType; + dropDownPortal: boolean; buttonWidth?: string; }; @@ -23,6 +24,7 @@ export default function AddConditions({ buttonText, collection, buttonWidth, + dropDownPortal, }: Props) { const fieldOptions = Object.entries(collection.properties) .filter((field) => !["multiURL"].includes(field[1].type)) @@ -102,6 +104,7 @@ export default function AddConditions({ }} multiple={false} isClearable={false} + portal={dropDownPortal} /> diff --git a/app/modules/Collection/Common/FilterValueField.tsx b/app/modules/Collection/Common/FilterValueField.tsx index f623a217..466c1701 100644 --- a/app/modules/Collection/Common/FilterValueField.tsx +++ b/app/modules/Collection/Common/FilterValueField.tsx @@ -11,6 +11,8 @@ type Props = { onChange: (value: any) => void; collection: CollectionType; propertyId: string; + dropDownPortal: boolean; + comparatorValue: string; }; @@ -20,6 +22,7 @@ export default function FilterValueField({ collection, propertyId, comparatorValue, + dropDownPortal, }: Props) { const type = collection?.properties[propertyId]?.type; const [memberOptions, setMemberOptions] = useState([]); @@ -91,6 +94,7 @@ export default function FilterValueField({ }} multiple={false} isClearable={false} + portal={dropDownPortal} /> ); case "is not": @@ -103,6 +107,7 @@ export default function FilterValueField({ }} multiple={false} isClearable={false} + portal={dropDownPortal} /> ); case "is one of": @@ -115,6 +120,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); default: @@ -132,6 +138,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); @@ -145,6 +152,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); case "includes one of": @@ -157,6 +165,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); default: @@ -173,6 +182,7 @@ export default function FilterValueField({ onChange(option); }} multiple={false} + portal={dropDownPortal} /> ); case "is not": @@ -184,6 +194,7 @@ export default function FilterValueField({ onChange(option); }} multiple={false} + portal={dropDownPortal} /> ); case "is one of": @@ -196,6 +207,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); default: @@ -212,6 +224,7 @@ export default function FilterValueField({ onChange(option); }} multiple={true} + portal={dropDownPortal} /> ); @@ -225,6 +238,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); case "includes one of": @@ -237,6 +251,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); default: @@ -277,6 +292,7 @@ export default function FilterValueField({ }} multiple={false} isClearable={false} + portal={dropDownPortal} /> ); case "token is one of": @@ -289,6 +305,7 @@ export default function FilterValueField({ }} multiple={true} isClearable={false} + portal={dropDownPortal} /> ); default: diff --git a/app/modules/Collection/VotingModule/MultiChoiceVotingOnMultipleResponses.tsx b/app/modules/Collection/VotingModule/MultiChoiceVotingOnMultipleResponses.tsx index 05939aa8..223153e2 100644 --- a/app/modules/Collection/VotingModule/MultiChoiceVotingOnMultipleResponses.tsx +++ b/app/modules/Collection/VotingModule/MultiChoiceVotingOnMultipleResponses.tsx @@ -20,6 +20,7 @@ export default function MultiChoiceVotingOnMultipleResponses() { firstRowMessage="Responses where" buttonText="Add Condition" collection={collection} + dropDownPortal={true} /> diff --git a/app/modules/CollectionProject/EditValue/index.tsx b/app/modules/CollectionProject/EditValue/index.tsx index 7a3b54c5..8951729b 100644 --- a/app/modules/CollectionProject/EditValue/index.tsx +++ b/app/modules/CollectionProject/EditValue/index.tsx @@ -28,8 +28,11 @@ type Props = { function EditValue({ value, setValue, propertyName, dataId, disabled }: Props) { const [isEditing, setIsEditing] = useState(false); const fieldInput = useRef(); - const { localCollection: collection, updateCollection } = - useLocalCollection(); + const { + localCollection: collection, + updateCollection, + colorMapping, + } = useLocalCollection(); const property = collection.properties[propertyName]; const [options, setOptions] = useState([]); const [filteredOptions, setFilteredOptions] = useState([]); @@ -100,7 +103,7 @@ function EditValue({ value, setValue, propertyName, dataId, disabled }: Props) { {" "} {property.type === "multiSelect" && ( @@ -218,7 +221,10 @@ function EditValue({ value, setValue, propertyName, dataId, disabled }: Props) { } }} > - + {property.type === "user" && ( { + setIsEditing(false); console.log({ reward }); + if ( + ((!reward.value && reward.value !== 0) || + !reward.token || + !reward.chain) && + dataId && + !collection.data?.[dataId]?.[propertyName]?.value + ) + return; setValue(reward); - setIsEditing(false); }} dataId={dataId} /> diff --git a/app/modules/CollectionProject/Filtering/Filter.tsx b/app/modules/CollectionProject/Filtering/Filter.tsx index 7d8f98c6..aacd9a03 100644 --- a/app/modules/CollectionProject/Filtering/Filter.tsx +++ b/app/modules/CollectionProject/Filtering/Filter.tsx @@ -102,6 +102,7 @@ function Filter() { firstRowMessage="Add a filter" buttonText="Add Filter" collection={collection} + dropDownPortal={true} />