@webkrafters/react-eagleeye 1.1.0-alpha.8 → 1.1.0-alpha.9
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.
|
@@ -340,7 +340,7 @@ var ObservableUniverse = exports.ObservableUniverse = /*#__PURE__*/function () {
|
|
|
340
340
|
value: function defineProvider() {
|
|
341
341
|
var me = this;
|
|
342
342
|
function provide() {
|
|
343
|
-
var _props$observableConf, _props$observableConf2, _props$observableConf3;
|
|
343
|
+
var _props$observableConf, _props$observableConf2, _props$observableConf3, _props$ref$current;
|
|
344
344
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
345
345
|
var id = (0, _react.useRef)(null);
|
|
346
346
|
(0, _react.useMemo)(function () {
|
|
@@ -377,12 +377,13 @@ var ObservableUniverse = exports.ObservableUniverse = /*#__PURE__*/function () {
|
|
|
377
377
|
connection.disconnect();
|
|
378
378
|
ctx.store.setState(value);
|
|
379
379
|
}, [(_props$observableConf = props.observableConfig) === null || _props$observableConf === void 0 ? void 0 : _props$observableConf.value, props.targetId, props.observable, (_props$observableConf2 = props.observableConfig) === null || _props$observableConf2 === void 0 ? void 0 : _props$observableConf2.prehooks, (_props$observableConf3 = props.observableConfig) === null || _props$observableConf3 === void 0 ? void 0 : _props$observableConf3.storage]);
|
|
380
|
-
(
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
380
|
+
if ('ref' in props && ((_props$ref$current = props.ref.current) === null || _props$ref$current === void 0 ? void 0 : _props$ref$current.targetId) !== id.current) {
|
|
381
|
+
if (!props.ref.current) {
|
|
382
|
+
props.ref.current = {};
|
|
383
|
+
}
|
|
384
|
+
;
|
|
385
|
+
props.ref.current.targetId = id.current;
|
|
386
|
+
}
|
|
386
387
|
var Context = me._context;
|
|
387
388
|
return (0, _jsxRuntime.jsx)(Context, {
|
|
388
389
|
value: id.current,
|
package/package.json
CHANGED
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"test:watch": "eslint --fix && jest --updateSnapshot --watchAll"
|
|
127
127
|
},
|
|
128
128
|
"types": "dist/index.d.ts",
|
|
129
|
-
"version": "1.1.0-alpha.
|
|
129
|
+
"version": "1.1.0-alpha.9",
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@webkrafters/eagleeye": "^1.0.8",
|
|
132
132
|
"js-sha512": "^0.9.0",
|