mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: fix two disabled tooltips (#8464)
Fix this warning: > MUI: You are providing a disabled button child to the Tooltip component. > A disabled element does not fire events. > Tooltip needs to listen to the child element’s events to display the title. > Add a simple wrapper element, such as a span.
This commit is contained in:
		
							parent
							
								
									cb0a26941b
								
							
						
					
					
						commit
						131e608885
					
				| @ -53,14 +53,16 @@ export const ArchiveButton: VFC<IArchiveButtonProps> = ({ | |||||||
|         <> |         <> | ||||||
|             <PermissionHOC projectId={projectId} permission={DELETE_FEATURE}> |             <PermissionHOC projectId={projectId} permission={DELETE_FEATURE}> | ||||||
|                 {({ hasAccess }) => ( |                 {({ hasAccess }) => ( | ||||||
|                     <Button |                     <span> | ||||||
|                         disabled={!hasAccess || isDialogOpen} |                         <Button | ||||||
|                         variant='outlined' |                             disabled={!hasAccess || isDialogOpen} | ||||||
|                         size='small' |                             variant='outlined' | ||||||
|                         onClick={() => setIsDialogOpen(true)} |                             size='small' | ||||||
|                     > |                             onClick={() => setIsDialogOpen(true)} | ||||||
|                         Archive |                         > | ||||||
|                     </Button> |                             Archive | ||||||
|  |                         </Button> | ||||||
|  |                     </span> | ||||||
|                 )} |                 )} | ||||||
|             </PermissionHOC> |             </PermissionHOC> | ||||||
|             <FeatureArchiveDialog |             <FeatureArchiveDialog | ||||||
|  | |||||||
| @ -96,14 +96,16 @@ export const ManageTags: VFC<IManageTagsProps> = ({ | |||||||
|         <> |         <> | ||||||
|             <PermissionHOC projectId={projectId} permission={UPDATE_FEATURE}> |             <PermissionHOC projectId={projectId} permission={UPDATE_FEATURE}> | ||||||
|                 {({ hasAccess }) => ( |                 {({ hasAccess }) => ( | ||||||
|                     <Button |                     <span> | ||||||
|                         disabled={!hasAccess || isOpen} |                         <Button | ||||||
|                         variant='outlined' |                             disabled={!hasAccess || isOpen} | ||||||
|                         size='small' |                             variant='outlined' | ||||||
|                         onClick={() => setIsOpen(true)} |                             size='small' | ||||||
|                     > |                             onClick={() => setIsOpen(true)} | ||||||
|                         Tags |                         > | ||||||
|                     </Button> |                             Tags | ||||||
|  |                         </Button> | ||||||
|  |                     </span> | ||||||
|                 )} |                 )} | ||||||
|             </PermissionHOC> |             </PermissionHOC> | ||||||
|             <ManageBulkTagsDialog |             <ManageBulkTagsDialog | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user