Skip to content

Commit

Permalink
* kanban: optimize UI of kanban links.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed May 28, 2024
1 parent 6959666 commit d4f7335
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/kanban/src/component/kanban.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,14 @@ export class Kanban<P extends KanbanProps = KanbanProps, S extends KanbanState =
if (this._hoverTimer) {
clearTimeout(this._hoverTimer);
}
const info = this._getElementInfo(event.target as HTMLElement);
const hover = info?.type === 'item' ? info.key : undefined;
this._hoverTimer = window.setTimeout(() => {
const info = this._getElementInfo(event.target as HTMLElement);
const itemKey = info?.type === 'item' ? info.key : undefined;
if (itemKey !== this.state.hover) {
this.setState({hover: itemKey});
if (hover !== this.state.hover) {
this.setState({hover});
}
}, 20);
this._hoverTimer = 0;
}, !hover && this.state.hover ? 0 : 20);
};

protected _handleClick = (event: MouseEvent) => {
Expand Down

0 comments on commit d4f7335

Please sign in to comment.