@kaspernj/api-maker 1.0.200 → 1.0.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -94,8 +94,6 @@ export default class CollectionLoader extends React.PureComponent {
|
|
|
94
94
|
this.shape.set({qParams})
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
loadModelsDebounce = debounce(this.loadModels)
|
|
98
|
-
|
|
99
97
|
loadModels = async () => {
|
|
100
98
|
const params = Params.parse()
|
|
101
99
|
const {abilities, collection, groupBy, modelClass, onModelsLoaded, preloads, select, selectColumns} = this.props
|
|
@@ -137,7 +135,8 @@ export default class CollectionLoader extends React.PureComponent {
|
|
|
137
135
|
})
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
|
|
138
|
+
loadModelsDebounce = debounce(digg(this, "loadModels"))
|
|
139
|
+
onModelCreated = digg(this, "loadModels")
|
|
141
140
|
|
|
142
141
|
onModelDestroyed = (args) => {
|
|
143
142
|
const {models} = digs(this.shape, "models")
|
package/src/event-created.jsx
CHANGED
|
@@ -35,10 +35,12 @@ export default class ApiMakerEventCreated extends React.PureComponent {
|
|
|
35
35
|
|
|
36
36
|
debounce () {
|
|
37
37
|
if (!this.debounceInstance) {
|
|
38
|
+
const {onCreated} = digs(this.props, "onCreated")
|
|
39
|
+
|
|
38
40
|
if (typeof this.props.debounce == "number") {
|
|
39
|
-
this.debounceInstance = debounce(
|
|
41
|
+
this.debounceInstance = debounce(onCreated, this.props.debounce)
|
|
40
42
|
} else {
|
|
41
|
-
this.debounceInstance = debounce(
|
|
43
|
+
this.debounceInstance = debounce(onCreated)
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
|