We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3f7a4b commit 29ed503Copy full SHA for 29ed503
src/selection/grid/BaseModel.mjs
@@ -23,6 +23,30 @@ class BaseModel extends Model {
23
return this.view.parent.columns.items.map(column => column.dataField)
24
}
25
26
+ /**
27
+ * Get the record for a given event path
28
+ * @param {Object[]} path
29
+ * @param {String} nodeId
30
+ * @returns {Number|String|null}
31
+ */
32
+ getRecordId(path, nodeId) {
33
+ let node, recordId;
34
+
35
+ for (node of path) {
36
+ if (node.id === nodeId) {
37
+ recordId = node.data.recordId;
38
39
+ if (this.view.store.getKeyType()?.includes('int')) {
40
+ recordId = parseInt(recordId)
41
+ }
42
43
+ return recordId
44
45
46
47
+ return null
48
49
50
/**
51
* Checks if an event path contains a grid cell editor
52
* @param {Object} data
0 commit comments