@@ -168,6 +168,13 @@ export function ExpirationForm({ prefix = '' }: Props) {
168168 }
169169 } , [ isISVBucket , setValue , prefix ] ) ;
170170
171+ const tagsInput = watch ( `${ prefix } filter.objectTags` ) ;
172+
173+ const areTagsEdited = useMemo ( ( ) => {
174+ if ( ! tags ) return false ;
175+ return tagsInput . some ( ( tag ) => tag . key !== '' || tag . value !== '' ) ;
176+ } , [ tags ] ) ;
177+
171178 return (
172179 < >
173180 < input
@@ -529,7 +536,8 @@ export function ExpirationForm({ prefix = '' }: Props) {
529536 disabled = {
530537 ( currentVersionTriggerDelayDays !== null &&
531538 currentVersionTriggerDelayDays !== undefined ) ||
532- ! isSourceBucketVersionned
539+ ! isSourceBucketVersionned ||
540+ areTagsEdited
533541 }
534542 content = {
535543 //@ts -expect-error fix this when you are working on it
@@ -554,7 +562,8 @@ export function ExpirationForm({ prefix = '' }: Props) {
554562 disabled = {
555563 ( currentVersionTriggerDelayDays !== null &&
556564 currentVersionTriggerDelayDays !== undefined ) ||
557- ! isSourceBucketVersionned
565+ ! isSourceBucketVersionned ||
566+ areTagsEdited
558567 }
559568 id = "expireDeleteMarkersTrigger"
560569 placeholder = "expireDeleteMarkersTrigger"
@@ -613,6 +622,7 @@ export function ExpirationForm({ prefix = '' }: Props) {
613622 These multiparts are not visible in the browser until the operation is complete.
614623 Removing these incomplete multipart uploads after a number of days after the initiating the operation prevents you from having unused S3 storage.
615624 ` }
625+ disabled = { areTagsEdited }
616626 content = {
617627 < Stack >
618628 < Box
@@ -639,6 +649,7 @@ export function ExpirationForm({ prefix = '' }: Props) {
639649 incompleteMultipartUploadTriggerDelayDays !==
640650 undefined
641651 }
652+ disabled = { areTagsEdited }
642653 onBlur = { onBlur }
643654 onChange = { ( e ) => {
644655 onChange ( e . target . checked ? 7 : null ) ;
0 commit comments