@textbus/adapter-react 4.0.0-alpha.30 → 4.0.0-alpha.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect, createElement } from 'react';
2
2
  import { Subject } from '@tanbo/stream';
3
- import { makeError, VElement, VTextNode, replaceEmpty } from '@textbus/core';
3
+ import { makeError, VElement, VTextNode, replaceEmpty, invokeListener } from '@textbus/core';
4
4
  import { DomAdapter } from '@textbus/platform-browser';
5
5
 
6
6
  // hack start
@@ -88,6 +88,9 @@ class Adapter extends DomAdapter {
88
88
  }
89
89
  else {
90
90
  children.push(this.componentRender(child));
91
+ if (!this.firstRending) {
92
+ invokeListener(child, 'onParentSlotUpdated');
93
+ }
91
94
  }
92
95
  }
93
96
  const props = Object.assign({}, (Array.from(vNode.attrs).reduce((a, b) => {
package/bundles/index.js CHANGED
@@ -90,6 +90,9 @@ class Adapter extends platformBrowser.DomAdapter {
90
90
  }
91
91
  else {
92
92
  children.push(this.componentRender(child));
93
+ if (!this.firstRending) {
94
+ core.invokeListener(child, 'onParentSlotUpdated');
95
+ }
93
96
  }
94
97
  }
95
98
  const props = Object.assign({}, (Array.from(vNode.attrs).reduce((a, b) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@textbus/adapter-react",
3
- "version": "4.0.0-alpha.30",
3
+ "version": "4.0.0-alpha.31",
4
4
  "description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
5
5
  "main": "./bundles/index.js",
6
6
  "module": "./bundles/index.esm.js",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "dependencies": {
28
28
  "@tanbo/stream": "^1.2.3",
29
- "@textbus/core": "^4.0.0-alpha.30",
30
- "@textbus/platform-browser": "^4.0.0-alpha.30",
29
+ "@textbus/core": "^4.0.0-alpha.31",
30
+ "@textbus/platform-browser": "^4.0.0-alpha.31",
31
31
  "react": "^17.0.0 || ^18.0.0"
32
32
  },
33
33
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/textbus/textbus.git/issues"
51
51
  },
52
- "gitHead": "9b14d8cf2a2473f31a36b51ee3d988ddecf776fb"
52
+ "gitHead": "54c13967d549e9c3795eb821d84ce3e811139630"
53
53
  }