-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨feat(grid): support progress editor #26
Conversation
Maple13
commented
Jul 31, 2024
- support hover pop-up editing component
- support hover pop-up editing component
# Conflicts: # src/app/app.component.ts
packages/grid/src/components/cell-editors/progress/progress-editor.component.ts
Outdated
Show resolved
Hide resolved
const cellDom = (event.target as HTMLElement).closest('.grid-cell') as HTMLElement; | ||
const type = cellDom && (cellDom.getAttribute('type')! as AITableFieldType); | ||
if (type && MOUSEOVER_EDIT_TYPE.includes(type)) { | ||
this.mouseoverRef = this.openEdit(cellDom); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
鼠标移出后缺少关闭逻辑?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 mouseover 来关闭弹框,移入到其他单元格或其他grid位置,就认为需要之前打开的编辑。
所以没有使用 mouseout 单独处理关闭逻辑。
e5fc20a
to
066af15
Compare
packages/grid/src/grid.component.ts
Outdated
} | ||
|
||
private closeHoverCellEditor(e: MouseEvent) { | ||
const hasGrid = e.target && (e.target as HTMLElement).closest('.ai-table-grid'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以先判断 this.mouseoverRef 是不是打开的,打开的情况下再去查询,可以减少查询次数
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
066af15
to
9d81ef6
Compare