@goldfishjs/reactive-connect
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -41,3 +41,6 @@ import _connect from "@goldfishjs/reactive/lib/connect"; | ||
attachLogic(componentOptions, refreshKey, 'after', syncProps); | ||
attachLogic(componentOptions, leaveKey, 'after', function () { | ||
this.store && (this.store.isSyncDataSafe = false); | ||
}); | ||
return componentOptions; | ||
} |
@@ -88,2 +88,3 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
var store, isSyncDataSafe; | ||
return _regeneratorRuntime.wrap(function _callee$(_context) { | ||
@@ -131,2 +132,13 @@ while (1) { | ||
case 3: | ||
store = this.view.store; | ||
isSyncDataSafe = store && store.isSyncDataSafe === false ? false : true; | ||
if (isSyncDataSafe) { | ||
_context.next = 7; | ||
break; | ||
} | ||
return _context.abrupt("return"); | ||
case 7: | ||
// Component Store needs $page.$batchedUpdates | ||
@@ -141,3 +153,3 @@ (this.view.$batchedUpdates ? this.view.$batchedUpdates.bind(this.view) : this.view.$page.$batchedUpdates.bind(this.view.$page))(function () { | ||
case 4: | ||
case 8: | ||
case "end": | ||
@@ -144,0 +156,0 @@ return _context.stop(); |
{ | ||
"name": "@goldfishjs/reactive-connect", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "goldfish-reactive-connect", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@goldfishjs/reactive": "^0.0.7", | ||
"@goldfishjs/reactive": "^0.0.8", | ||
"mini-types": "^0.0.4" | ||
@@ -22,0 +22,0 @@ }, |
@@ -90,3 +90,12 @@ import { connect, IViewInstance, ChangeOptions } from '@goldfishjs/reactive'; | ||
attachLogic<typeof leaveKey, Required<ComponentOptions<P, D, CS, M>>[typeof leaveKey]>( | ||
componentOptions, | ||
leaveKey, | ||
'after', | ||
function (this: ComponentInstance<P, D, CS, M>) { | ||
this.store && (this.store.isSyncDataSafe = false); | ||
}, | ||
); | ||
return componentOptions; | ||
} |
@@ -94,2 +94,9 @@ import { | ||
await Promise.resolve(); | ||
const store = (this.view as any).store; | ||
const isSyncDataSafe = store && store.isSyncDataSafe === false ? false : true; | ||
if (!isSyncDataSafe) { | ||
return; | ||
} | ||
// Component Store needs $page.$batchedUpdates | ||
@@ -96,0 +103,0 @@ ( |
51116
1419
+ Added@goldfishjs/reactive@0.0.8(transitive)
- Removed@goldfishjs/reactive@0.0.7(transitive)
Updated@goldfishjs/reactive@^0.0.8