@steroidsjs/core 2.2.14 → 2.2.17
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/hooks/useDataProvider.js
CHANGED
|
@@ -53,6 +53,7 @@ exports.__esModule = true;
|
|
|
53
53
|
var react_redux_1 = require("react-redux");
|
|
54
54
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
55
55
|
var isFunction_1 = __importDefault(require("lodash-es/isFunction"));
|
|
56
|
+
var isEqual_1 = __importDefault(require("lodash-es/isEqual"));
|
|
56
57
|
var react_1 = require("react");
|
|
57
58
|
var react_use_1 = require("react-use");
|
|
58
59
|
var data_1 = require("../utils/data");
|
|
@@ -133,7 +134,7 @@ function useDataProvider(config) {
|
|
|
133
134
|
clearTimeout(delayTimerRef.current);
|
|
134
135
|
}
|
|
135
136
|
// Changed query logic
|
|
136
|
-
if (prevQuery !== config.query || prevParams
|
|
137
|
+
if (prevQuery !== config.query || !isEqual_1["default"](prevParams, dataProvider.params)) {
|
|
137
138
|
// Search with delay
|
|
138
139
|
delayTimerRef.current = setTimeout(fetchRemote, autoComplete.delay);
|
|
139
140
|
}
|
package/hooks/useLayout.js
CHANGED
|
@@ -91,7 +91,7 @@ function useLayout(initAction) {
|
|
|
91
91
|
isInitialized: auth_1.isInitialized(state),
|
|
92
92
|
initializeCounter: auth_1.getInitializeCounter(state),
|
|
93
93
|
redirectPageId: state.auth.redirectPageId,
|
|
94
|
-
loginRouteId: Object.keys(routesMap).find(function (name) { return routesMap[name].role === Router_1.ROUTER_ROLE_LOGIN; })
|
|
94
|
+
loginRouteId: routesMap && Object.keys(routesMap).find(function (name) { return routesMap[name].role === Router_1.ROUTER_ROLE_LOGIN; })
|
|
95
95
|
};
|
|
96
96
|
}), route = _a.route, user = _a.user, data = _a.data, isInitialized = _a.isInitialized, initializeCounter = _a.initializeCounter, redirectPageId = _a.redirectPageId, loginRouteId = _a.loginRouteId;
|
|
97
97
|
var _b = react_1.useState(null), error = _b[0], setError = _b[1];
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@ function NumberField(props) {
|
|
|
21
21
|
var components = hooks_1.useComponents();
|
|
22
22
|
props.inputProps = react_1.useMemo(function () {
|
|
23
23
|
var _a;
|
|
24
|
-
return (__assign({ name: props.input.name, value: (_a = props.input.value) !== null && _a !== void 0 ? _a : '', onChange: function (
|
|
24
|
+
return (__assign({ name: props.input.name, value: (_a = props.input.value) !== null && _a !== void 0 ? _a : '', onChange: function (value) { return props.input.onChange(value); }, type: 'number', min: props.min, max: props.max, step: props.step, placeholder: props.placeholder, disabled: props.disabled }, props.inputProps));
|
|
25
25
|
}, [props.disabled, props.input, props.inputProps, props.placeholder, props.min, props.max, props.step]);
|
|
26
26
|
return components.ui.renderView(props.view || 'form.NumberFieldView', props);
|
|
27
27
|
}
|