Skip to content

Antd upgrade 5.20.0 #1102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
upgrade antd version to 5.19.4
  • Loading branch information
raheeliftikhar5 committed Aug 12, 2024
commit 8dcdf944ca6dc038a191ba9faad839862cf5a07b
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export function Dropdown<T extends OptionsType>(props: DropdownProps<T>) {
<SegmentedWrapper $placement={placement}>
<Segmented
block={true}
onChange={(value) => props.onChange(value.toString())}
onChange={(value) => props.onChange(String(value))}
defaultValue={props.defaultValue}
value={props.value}
options={props.options as any}
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const TacoButton = forwardRef(
props: Omit<ButtonProps, "type"> & {
buttonType?: TacoButtonType;
},
ref: React.Ref<HTMLElement>
ref: React.Ref<HTMLButtonElement>
) => {
const { buttonType, ...restProps } = props;
let loadingBackground;
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/react-test-renderer": "^18.0.0",
"@types/react-virtualized": "^9.21.21",
"animate.css": "^4.1.1",
"antd": "5.13.2",
"antd": "^5.19.4",
"axios": "^1.6.2",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
Expand Down
9 changes: 5 additions & 4 deletions client/packages/lowcoder/src/components/Segmented.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { default as AntdSegmented } from "antd/es/segmented";
import type { SegmentedProps } from "antd/es/segmented";
import styled from "styled-components";

type PropsType<T extends React.ForwardRefExoticComponent<any>> =
T extends React.ForwardRefExoticComponent<infer R> ? R : never;
type SegmentedProps = PropsType<typeof AntdSegmented>;
// type PropsType<T extends React.ForwardRefExoticComponent<any>> =
// T extends React.ForwardRefExoticComponent<infer R> ? R : never;
// type SegmentedProps = PropsType<typeof AntdSegmented>;

const StyledSegmented = styled(AntdSegmented)<PropsType<typeof AntdSegmented>>`
const StyledSegmented = styled(AntdSegmented)<SegmentedProps>`
width: 100%;
height: 28px;
border-radius: 6px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { trans } from "i18n";
import React, { Suspense, useEffect, useRef, useState, useContext } from "react";
import { arrayStringExposingStateControl } from "comps/controls/codeStateControl";
import { BoolControl } from "comps/controls/boolControl";
import type { ItemType } from "antd/es/menu/hooks/useItems";
import type { ItemType } from "antd/es/menu/interface";
import { RefControl } from "comps/controls/refControl";
import { EditorContext } from "comps/editorState";
import { useMergeCompStyles } from "@lowcoder-ee/util/hooks";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ import { dateRefMethods, disabledTime, handleDateChange } from "comps/comps/date
import { DateUIView } from "./dateUIView";
import { useIsMobile } from "util/hooks";
import { RefControl } from "comps/controls/refControl";
import { CommonPickerMethods } from "antd/es/date-picker/generatePicker/interface";
// import { CommonPickerMethods } from "antd/es/date-picker/generatePicker/interface";
import type { DatePickerType } from "antd/es/date-picker";
import { DateRangeUIView } from "comps/comps/dateComp/dateRangeUIView";
import { EditorContext } from "comps/editorState";
import { useMergeCompStyles } from "@lowcoder-ee/util/hooks";
import { DatePicker } from "antd";

const CommonPickerMethods = _.pick(DatePicker, 'ref');

const defaultStyle = {
borderStyle: 'solid',
Expand Down Expand Up @@ -184,7 +188,7 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props, dispatch
animationStyle:props.animationStyle,
children: (
<DateUIView
viewRef={props.viewRef}
// viewRef={props.viewRef}
disabledTime={() => disabledTime(props.minTime, props.maxTime)}
$style={props.inputFieldStyle}
disabled={props.disabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TacoButton,
} from "lowcoder-design";
import React, { FunctionComponent, useState } from "react";
import type { ItemType } from "antd/es/menu/hooks/useItems";
import type { ItemType } from "antd/es/menu/interface";
import { HomeResInfo } from "../../util/homeResUtils";
import { createAppItemClass } from "../tutorials/HomeTutorialsV2";
import styled from "styled-components";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { trans } from "i18n";
import { showSwitchOrg } from "@lowcoder-ee/pages/common/customerService";
import { checkIsMobile } from "util/commonUtils";
import { selectSystemConfig } from "redux/selectors/configSelectors";
import type { ItemType } from "antd/es/menu/hooks/useItems";
import type { ItemType } from "antd/es/menu/interface";

const { Item } = Menu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
saveCollisionStatus,
} from "util/localStorageUtil";
import { default as DownOutlined } from "@ant-design/icons/DownOutlined";
import type { ItemType } from "antd/es/menu/hooks/useItems";
import ThemeSettingsSelector from "components/ThemeSettingsSelector";

export type DisabledCollisionStatus = "true" | "false"; // "true" means collision is not enabled - Layering works, "false" means collision is enabled - Layering does not work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function ThemeList(props: ThemeListProp) {
<Column
key="id"
dataIndex="id"
render={(value, theme) =>
render={(value, theme: ThemeType) =>
isAdmin && (
<ControlCol>
<EditButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const ConfirmButton = (props: {
style?: CSSProperties;
loading?: boolean;
}) => {
const ref = useRef<HTMLElement>(null);
const ref = useRef<HTMLButtonElement>(null);
return (
<>
<ReactHotkeys
Expand Down
Loading