解决 onRowClick 回调函数中,事件对象属性均为 null 的问题
This commit is contained in:
parent
5e16aae44a
commit
ddb6386de4
|
@ -464,6 +464,10 @@ var TableRow = function (_Component) {
|
||||||
};
|
};
|
||||||
|
|
||||||
TableRow.prototype.onRowClick = function onRowClick(event) {
|
TableRow.prototype.onRowClick = function onRowClick(event) {
|
||||||
|
// fix: 解决 onRowClick 回调函数中,事件对象属性均为 null 的问题
|
||||||
|
// 异步访问事件属性
|
||||||
|
// 调用 event.persist() 会从事件池中移除该合成函数并允许对该合成事件的引用被保留下来。
|
||||||
|
event.persist();
|
||||||
var _props5 = this.props,
|
var _props5 = this.props,
|
||||||
record = _props5.record,
|
record = _props5.record,
|
||||||
index = _props5.index,
|
index = _props5.index,
|
||||||
|
|
|
@ -35884,6 +35884,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
TableRow.prototype.onRowClick = function onRowClick(event) {
|
TableRow.prototype.onRowClick = function onRowClick(event) {
|
||||||
|
// fix: 解决 onRowClick 回调函数中,事件对象属性均为 null 的问题
|
||||||
|
// 异步访问事件属性
|
||||||
|
// 调用 event.persist() 会从事件池中移除该合成函数并允许对该合成事件的引用被保留下来。
|
||||||
|
event.persist();
|
||||||
var _props5 = this.props,
|
var _props5 = this.props,
|
||||||
record = _props5.record,
|
record = _props5.record,
|
||||||
index = _props5.index,
|
index = _props5.index,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "2.1.6",
|
"version": "2.1.7-beta.0",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
|
|
@ -364,6 +364,10 @@ class TableRow extends Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
onRowClick(event) {
|
onRowClick(event) {
|
||||||
|
// fix: 解决 onRowClick 回调函数中,事件对象属性均为 null 的问题
|
||||||
|
// 异步访问事件属性
|
||||||
|
// 调用 event.persist() 会从事件池中移除该合成函数并允许对该合成事件的引用被保留下来。
|
||||||
|
event.persist();
|
||||||
const {
|
const {
|
||||||
record,
|
record,
|
||||||
index,
|
index,
|
||||||
|
|
Loading…
Reference in New Issue