javascript - ag-grid:使整行成为行拖动的夹点
问题描述
我正在使用 Vue 版本的 ag-grid 21.2.1 ( https://www.ag-grid.com/vue-getting-started/ ) 并实现了行拖动 ( https://www.ag-grid.com/ javascript-grid-row-dragging/ ) 在我们的一张桌子上。一切似乎都很好,但现在我想让整行成为拖动的“抓地力”。我尝试使用pointer-events: none
on.ag-row
并使本机 ag 握把项目更大且可点击,但这似乎不起作用:
.ag-icon-grip {
position: absolute;
width: 600px;
pointer-events: auto;
}
有人在这方面取得了成功吗?
解决方案
可能还有其他方法,javascript
但您可以使用css
以下方法
css
.drag-row {
overflow: unset !important;
}
.drag-row .ag-cell-value {
padding-left: 24px;
}
.drag-row .ag-row-drag {
position: absolute;
width: 1200px;
z-index: 2;
}
js
this.columnDefs = [
{
field: "athlete",
cellClass: 'drag-row',
rowDrag: true
},
// ...
];
工作的 plunker https://next.plnkr.co/edit/naFYtZTBZUJJOCfB
推荐阅读
- javascript - 如何使用 Reactive Form 向表单添加新控件而不会出现错误:“ERROR InternalError:”too much recursion”?
- linux - 汇编代码不识别?和@data
- javascript - 是否可以从文本区域接收输入并随后在同一文本区域中显示输出?
- javascript - 为什么我的 removeNumbersLessThan 功能无法正常工作?
- wordpress - 如何为核心块添加锚支持?
- python - 如何让pygame实时更新?
- java - 如何修复此 DataBinding 和 LiveData 代码?
- google-apps-script - 使用 apps-script-oauth2 库 - 授权后如何执行回调?
- python - Pandas unstack stack 用 nans 填充缺失的功能
- javascript - 如何将项目添加到 ScrollView 子项的顶部?