Skip to content

Commit

Permalink
fix(*): add displayName to components for configProvider popupContain…
Browse files Browse the repository at this point in the history
…er bug
  • Loading branch information
eternalsky committed Aug 9, 2024
1 parent 45c8485 commit c682c03
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/breadcrumb/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class Breadcrumb extends Component<BreadcrumbProps, BreadcrumbState> {
component: 'nav',
};

static displayName = 'Breadcrumb';

breadcrumbEl: HTMLUListElement;

constructor(props: BreadcrumbProps) {
Expand Down
2 changes: 2 additions & 0 deletions components/calendar2/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class Calendar extends React.Component<CalendarProps, CalendarState> {
mode: CALENDAR_MODE.MONTH,
};

static displayName = 'Calendar';

readonly props: CalendarPropsWithDefault;

constructor(props: CalendarProps) {
Expand Down
1 change: 1 addition & 0 deletions components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default class Dropdown extends Component<DropdownProps, DropdownState> {
cache: false,
onPosition: noop,
};
static displayName = 'Dropdown';

constructor(props: DropdownProps) {
super(props);
Expand Down
2 changes: 2 additions & 0 deletions components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Icon extends Component<IconProps> {
size: 'medium',
};

static displayName = 'Icon';

static _typeMark = 'icon';

render() {
Expand Down
1 change: 1 addition & 0 deletions components/menu-button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class MenuButton extends React.Component<MenuButtonProps, MenuButtonState> {
static Item = Menu.Item;
static Group = Menu.Group;
static Divider = Menu.Divider;
static displayName = 'MenuButton';

static propTypes = {
prefix: PropTypes.string,
Expand Down
2 changes: 2 additions & 0 deletions components/menu/view/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ export class Menu extends Component<MenuProps, MenuState> {
icons: {},
};

static displayName = 'Menu';

static getDerivedStateFromProps(nextProps: MenuPropsWithDefaults, prevState: MenuState) {
const state: Partial<MenuState> = {};

Expand Down
2 changes: 2 additions & 0 deletions components/nav/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ class Nav extends Component<NavProps> {
isCollapse: PropTypes.bool,
};

static displayName = 'Nav';

menu: MenuInstance | null;

getChildContext() {
Expand Down
3 changes: 3 additions & 0 deletions components/number-picker/number-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ class NumberPicker extends React.Component<NumberPickerProps, NumberPickerState>
alwaysShowTrigger: false,
stringMode: false,
};

static displayName = 'NumberPicker';

inputRef: React.ComponentRef<typeof Input> | null;

constructor(props: NumberPickerProps) {
Expand Down
2 changes: 2 additions & 0 deletions components/overlay/overlay-v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,6 @@ const Overlay2 = (props: OverlayV2Props) => {
);
};

Overlay2.displayName = 'Overlay';

export default Overlay2;
1 change: 1 addition & 0 deletions components/overlay/overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class Overlay extends Component<OverlayV1Props, OverlayState> {
maskClass: '',
useCapture: true,
};
static displayName = 'Overlay';
lastAlign: string | boolean | undefined;
timeoutMap: { [key: string]: number };
_isMounted: boolean;
Expand Down
2 changes: 2 additions & 0 deletions components/overlay/popup-v2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,6 @@ const Popup = (props: PopupProps) => {
);
};

Popup.displayName = 'Popup';

export default Popup;
2 changes: 2 additions & 0 deletions components/overlay/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ class Popup extends Component<PopupProps, PopupState> {
container: () => document.body,
rtl: false,
};

static displayName = 'Popup';
_mouseNotFirstOnMask: boolean;
_isForwardContent: boolean | null;
overlay: InstanceType<typeof Overlay> | null;
Expand Down
2 changes: 2 additions & 0 deletions components/progress/view/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export default class Progress extends Component<ProgressProps> {
textRender: (percent: number) => `${Math.floor(percent)}%`,
};

static displayName = 'Progress';

static contextTypes = {
prefix: PropTypes.string,
};
Expand Down
2 changes: 2 additions & 0 deletions components/radio/radio-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class RadioGroup extends Component<GroupProps, GroupState> {
disabled: PropTypes.bool,
};

static displayName = 'RadioGroup';

radioRefs: unknown[];
hasFocus: boolean;

Expand Down
2 changes: 2 additions & 0 deletions components/responsive-grid/cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Cell extends Component<CellProps> {
device: 'desktop',
};

static displayName = 'Cell';

render() {
const { component, children } = this.props;
const View = component!;
Expand Down
2 changes: 2 additions & 0 deletions components/responsive-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class ResponsiveGrid extends Component<ResponsiveGridProps> {
dense: false,
};

static displayName = 'ResponsiveGrid';

render() {
const {
prefix,
Expand Down
2 changes: 2 additions & 0 deletions components/select/option-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export default class OptionGroup extends React.Component<OptionGroupProps> {

static _typeMark = 'next_select_option_group';

static displayName = 'OptionGroup';

render() {
return this.props.children;
}
Expand Down
2 changes: 2 additions & 0 deletions components/select/option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default class Option extends React.Component<OptionProps> {

static _typeMark = 'next_select_option';

static displayName = 'Option';

render() {
return this.props.children;
}
Expand Down

0 comments on commit c682c03

Please sign in to comment.