Skip to content

Commit edeef25

Browse files
committed
[TOOL-2995]: Fix Engine Contract Subscription UI issue with checkboxes
1 parent b14aa54 commit edeef25

File tree

2 files changed

+37
-28
lines changed

2 files changed

+37
-28
lines changed

apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(instance)/[engineId]/contract-subscriptions/components/add-contract-subscription-button.tsx

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from "@3rdweb-sdk/react/hooks/useEngine";
1010
import { useResolveContractAbi } from "@3rdweb-sdk/react/hooks/useResolveContractAbi";
1111
import {
12-
CheckboxGroup,
1312
Collapse,
1413
Flex,
1514
FormControl,
@@ -324,21 +323,22 @@ const ModalBodyInputData = ({
324323
<FormLabel>Processed Data</FormLabel>
325324

326325
<div className="flex flex-col gap-2">
327-
<Checkbox
328-
{...form.register("processEventLogs")}
329-
checked={form.getValues("processEventLogs")}
330-
onCheckedChange={(val) => {
331-
const checked = !!val;
332-
form.setValue("processEventLogs", checked);
333-
if (checked) {
334-
processEventLogsDisclosure.onOpen();
335-
} else {
336-
processEventLogsDisclosure.onClose();
337-
}
338-
}}
339-
>
340-
<Text>Event Logs</Text>
341-
</Checkbox>
326+
<CheckboxWithLabel>
327+
<Checkbox
328+
{...form.register("processEventLogs")}
329+
checked={form.getValues("processEventLogs")}
330+
onCheckedChange={(val) => {
331+
const checked = !!val;
332+
form.setValue("processEventLogs", checked);
333+
if (checked) {
334+
processEventLogsDisclosure.onOpen();
335+
} else {
336+
processEventLogsDisclosure.onClose();
337+
}
338+
}}
339+
/>
340+
<span>Event Logs</span>
341+
</CheckboxWithLabel>
342342
{/* Shows all/specific events if processing event logs */}
343343
<Collapse in={processEventLogsDisclosure.isOpen}>
344344
<div className="flex flex-col gap-2 px-4">
@@ -394,7 +394,7 @@ const ModalBodyInputData = ({
394394
}
395395
}}
396396
/>
397-
<Text>Transaction Receipts</Text>
397+
<span>Transaction Receipts</span>
398398
</CheckboxWithLabel>
399399
{/* Shows all/specific functions if processing transaction receipts */}
400400
<Collapse in={processTransactionReceiptsDisclosure.isOpen}>
@@ -546,16 +546,21 @@ const FilterSelector = ({
546546
</Text>
547547
) : (
548548
<div className="flex max-h-[300px] flex-col gap-2 overflow-y-auto">
549-
<CheckboxGroup
550-
value={filter}
551-
onChange={(selected: string[]) => setFilter(selected)}
552-
>
553-
{filterNames.map((name) => (
554-
<Checkbox key={name} value={name}>
555-
<Text>{name}</Text>
556-
</Checkbox>
557-
))}
558-
</CheckboxGroup>
549+
{filterNames.map((name) => (
550+
<CheckboxWithLabel key={name}>
551+
<Checkbox
552+
checked={filter.includes(name)}
553+
onCheckedChange={(val) => {
554+
if (val) {
555+
setFilter([...filter, name]);
556+
} else {
557+
setFilter(filter.filter((item) => item !== name));
558+
}
559+
}}
560+
/>
561+
<span>{name}</span>
562+
</CheckboxWithLabel>
563+
))}
559564
</div>
560565
)}
561566
</Card>

apps/dashboard/src/core-ui/batch-upload/batch-lazy-mint.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,11 @@ export const BatchLazyMint: ComponentWithChildren<
251251
{form.watch("revealType") && (
252252
<>
253253
<CheckboxWithLabel>
254-
<Checkbox {...form.register("shuffle")} className="mt-3" />
254+
<Checkbox
255+
{...form.register("shuffle")}
256+
className="mt-3"
257+
onCheckedChange={(val) => form.setValue("shuffle", !!val)}
258+
/>
255259
<div className="flex flex-col items-center gap-1 md:flex-row">
256260
<p>Shuffle the order of the NFTs before uploading.</p>
257261
<em>This is an off-chain operation and is not provable.</em>

0 commit comments

Comments
 (0)