99} from "@3rdweb-sdk/react/hooks/useEngine" ;
1010import { useResolveContractAbi } from "@3rdweb-sdk/react/hooks/useResolveContractAbi" ;
1111import {
12- CheckboxGroup ,
1312 Collapse ,
1413 Flex ,
1514 FormControl ,
@@ -324,21 +323,21 @@ 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+ checked = { form . watch ( "processEventLogs" ) }
329+ onCheckedChange = { ( val ) => {
330+ const checked = ! ! val ;
331+ form . setValue ( "processEventLogs" , checked ) ;
332+ if ( checked ) {
333+ processEventLogsDisclosure . onOpen ( ) ;
334+ } else {
335+ processEventLogsDisclosure . onClose ( ) ;
336+ }
337+ } }
338+ / >
339+ < span > Event Logs</ span >
340+ </ CheckboxWithLabel >
342341 { /* Shows all/specific events if processing event logs */ }
343342 < Collapse in = { processEventLogsDisclosure . isOpen } >
344343 < div className = "flex flex-col gap-2 px-4" >
@@ -382,8 +381,7 @@ const ModalBodyInputData = ({
382381
383382 < CheckboxWithLabel >
384383 < Checkbox
385- { ...form . register ( "processTransactionReceipts" ) }
386- checked = { form . getValues ( "processTransactionReceipts" ) }
384+ checked = { form . watch ( "processTransactionReceipts" ) }
387385 onCheckedChange = { ( val ) => {
388386 const checked = ! ! val ;
389387 form . setValue ( "processTransactionReceipts" , checked ) ;
@@ -394,7 +392,7 @@ const ModalBodyInputData = ({
394392 }
395393 } }
396394 />
397- < Text > Transaction Receipts</ Text >
395+ < span > Transaction Receipts</ span >
398396 </ CheckboxWithLabel >
399397 { /* Shows all/specific functions if processing transaction receipts */ }
400398 < Collapse in = { processTransactionReceiptsDisclosure . isOpen } >
@@ -546,16 +544,21 @@ const FilterSelector = ({
546544 </ Text >
547545 ) : (
548546 < 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 >
547+ { filterNames . map ( ( name ) => (
548+ < CheckboxWithLabel key = { name } >
549+ < Checkbox
550+ checked = { filter . includes ( name ) }
551+ onCheckedChange = { ( val ) => {
552+ if ( val ) {
553+ setFilter ( [ ...filter , name ] ) ;
554+ } else {
555+ setFilter ( filter . filter ( ( item ) => item !== name ) ) ;
556+ }
557+ } }
558+ />
559+ < span > { name } </ span >
560+ </ CheckboxWithLabel >
561+ ) ) }
559562 </ div >
560563 ) }
561564 </ Card >
0 commit comments