chore(ui): add prepareType prop support in manage button component (#13524)

This commit is contained in:
Sachin Chaurasiya 2023-10-11 20:47:45 +05:30 committed by GitHub
parent b4787f0217
commit bfcf185138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ interface Props {
editDisplayNamePermission?: boolean;
onEditDisplayName?: (data: EntityName) => Promise<void>;
allowRename?: boolean;
prepareType?: boolean;
}
const ManageButton: FC<Props> = ({
@ -75,6 +76,7 @@ const ManageButton: FC<Props> = ({
editDisplayNamePermission,
onEditDisplayName,
allowRename,
prepareType = true,
}) => {
const { t } = useTranslation();
const [isDelete, setIsDelete] = useState<boolean>(false);
@ -257,6 +259,7 @@ const ManageButton: FC<Props> = ({
entityType={entityType || ''}
hardDeleteMessagePostFix={hardDeleteMessagePostFix}
isRecursiveDelete={isRecursiveDelete}
prepareType={prepareType}
softDeleteMessagePostFix={softDeleteMessagePostFix}
visible={isDelete}
onCancel={() => setIsDelete(false)}