-
Notifications
You must be signed in to change notification settings - Fork 199
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
🤔s2中如何实现右键点击,获取当前行数据 #2816
Comments
demo 打不开 |
import { PivotSheet, BaseEvent, S2Event } from "@antv/s2"; class ContextMenu extends BaseEvent {
} fetch(
}); |
用的什么版本, issue 请按照模版填写, 下次直接关闭了 |
👌 |
1.x 的文档不太全.
class ContextMenu extends BaseEvent {
bindEvents() {
this.spreadsheet.on(S2Event.DATA_CELL_CONTEXT_MENU, (event) => {
{
const cell = this.spreadsheet.getCell(event.target);
const meta = cell?.getMeta();
// 获取当前行数据
const rowData = this.spreadsheet.dataSet.getMultiData(meta?.rowQuery);
}
});
}
}
|
你好 @voidman2017, Issue 板块是用于 bug 反馈与需求讨论的地方。你可以试着在 antv s2 discussions 新开一个 discussion, 选择 Hello, @voidman2017. The Issue section is used for bug feedback and requirement discussion. You could open a new discussion in antv s2 discussions, choose the |
那如果是TableSheet是否无法实现该功能 |
🏷 Version
Sheet Type
🖋 Description
🔗 Reproduce Link
😊 Expected Behavior
😅 Current Behavior
请问如何实现鼠标右键点击,获取当前点击的行原始数据
https://codesandbox.io/p/sandbox/s2-contextmenu-cygvm7?file=%2Findex.ts%3A6%2C8
该种方式并未实现
The text was updated successfully, but these errors were encountered: