Skip to content

Commit

Permalink
feat: fix bug close #1023 #1021 #1018
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangbing4 committed Jul 31, 2024
1 parent d9b4d8a commit 9c2af2c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions components/dropdown/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {DropdownMenu, DROPDOWN_MENU} from './menu';
import {IgnoreClickEvent} from '../../hooks/useDocumentClick';
import { Dropdown as ExportDropdown, DropdownMenu as ExportDropdownMenu } from '.';
import { useConfigContext } from '../config';
import type { Tooltip } from '../tooltip/tooltip';

export interface DropdownItemProps {
disabled?: boolean
Expand Down Expand Up @@ -61,8 +62,12 @@ export class DropdownItem extends Component<DropdownItemProps, DropdownItemEvent
if (this.get('hideOnSelect')) {
// hide all dropdowns
let dropdown = this.dropdown;
do { dropdown!.hide(true); }
while (dropdown = dropdown!.dropdown);
do {
if (!(dropdown as Tooltip).$isTooltip) {
dropdown!.hide(true);
}
dropdown = dropdown!.dropdown;
} while (dropdown);
}
}

Expand Down
3 changes: 3 additions & 0 deletions components/menu/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ export const makeMenuStyles = cache(function makeMenuStyles(k: string) {
&.${k}-collapsed-arrow {
width: 0px;
border-left: none;
.${k}-menu-header {
padding: 0;
}
.${k}-menu-body {
overflow: hidden;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion components/table/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const makeStyles = cache(function makeStyles(k: string) {
}
table {
width: 100%;
// border-collapse: collapse;
border-collapse: separate;
border-spacing: 0;
table-layout: fixed;
// td,
Expand Down
2 changes: 2 additions & 0 deletions components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export class Tooltip<
static defaults = defaults;
static events = events;

public $isTooltip = true;

show(shouldFocus: boolean = false) {
if (this.get('disabled')) return;

Expand Down

0 comments on commit 9c2af2c

Please sign in to comment.