Skip to content

Commit

Permalink
fix: 🐛 arco type, and popconfirm#popVisible -> open
Browse files Browse the repository at this point in the history
  • Loading branch information
charlzyx committed Jan 23, 2024
1 parent db4f928 commit fb45425
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions src/pro-array-table/mixin.base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Addition = (
return (
<Button
type={BUTTON_TYPE}
// @ts-ignore
block
{...props}
disabled={self?.disabled}
Expand Down Expand Up @@ -123,7 +124,7 @@ export const Copy = React.forwardRef(
props.className,
)}
ref={ref}
onClick={(e) => {
onClick={(e: any) => {
if (self?.disabled) return;
e.stopPropagation();
if (array.props?.disabled) return;
Expand Down Expand Up @@ -227,7 +228,7 @@ export const MoveDown = React.forwardRef(
props.className,
)}
ref={ref}
onClick={(e) => {
onClick={(e: any) => {
if (self?.disabled) return;
e.stopPropagation();
if (props.onClick) {
Expand Down Expand Up @@ -268,7 +269,7 @@ export const MoveUp = React.forwardRef(
props.className,
)}
ref={ref}
onClick={(e) => {
onClick={(e: any) => {
if (self?.disabled) return;
e.stopPropagation();
if (props.onClick) {
Expand Down
1 change: 0 additions & 1 deletion src/pro-array-table/types.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ArrayBase } from "@formily/antd";
import { ArrayField, FieldDisplayTypes, GeneralField } from "@formily/core";
import { Schema } from "@formily/json-schema";
import type { Table } from "../adaptor";
Expand Down
2 changes: 1 addition & 1 deletion src/shadow-form/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const ShadowModal: React.FC<
<Modal
{...props}
open={visible}
onCancel={(e) => {
onCancel={(e: any) => {
if (pending.current) return;
return form
?.reset()
Expand Down
2 changes: 1 addition & 1 deletion src/shadow-form/popconfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ShadowPopconfirm: React.FC<
return (
<Popconfirm
{...props}
popupVisible={visible}
open={visible}
onOpenChange={(o) => {
if (o !== visible) {
return setVisible(o);
Expand Down
9 changes: 7 additions & 2 deletions ui/arco/commonfiy/pops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ export const Drawer = ({

export type ModalProps = Omit<
React.ComponentProps<typeof ArcoModal>,
"visible"
"visible" | "onCancel"
> & {
onCancel?: (e?: any) => any | Promise<any>;
open?: React.ComponentProps<typeof ArcoModal>["visible"];
destroyOnClose?: React.ComponentProps<typeof ArcoModal>["unmountOnExit"];
};
Expand All @@ -47,7 +48,11 @@ export const Modal = ({
...props
}: React.PropsWithChildren<ModalProps>) => {
return (
<ArcoModal {...props} visible={open} unmountOnExit={destroyOnClose}>
<ArcoModal
{...(props as any)}
visible={open}
unmountOnExit={destroyOnClose}
>
{props.children}
</ArcoModal>
);
Expand Down

0 comments on commit fb45425

Please sign in to comment.