@zohodesk/components 1.0.0-temp-350 → 1.0.0-temp-555

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/README.md CHANGED
@@ -32,10 +32,13 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
+ # 1.0.0-alpha-242
36
+
37
+ - Tag -> defaultLink palette added
38
+
35
39
  # 1.0.0-alpha-241
36
40
 
37
41
  - Added unobserve element condition for Tooltip.
38
- - Tag -> defaultLink palatte added
39
42
 
40
43
  # 1.0.0-alpha-240
41
44
 
@@ -109,6 +109,7 @@ export default class ResizeComponent extends React.Component {
109
109
  }
110
110
 
111
111
  reset() {
112
+ this.forceUpdate = true;
112
113
  this.childrenCurrentList = [];
113
114
  this.tabsObserver.disconnect();
114
115
  this.tabObserver && this.tabObserver.disconnect();
@@ -146,9 +147,12 @@ export default class ResizeComponent extends React.Component {
146
147
  onResize(size) {
147
148
  if (size) {
148
149
  window.requestAnimationFrame(() => {
149
- if (this.height !== size.height || this.width !== size.width && !this.isAnimating) {
150
+ if (this.forceUpdate || (this.height !== size.height || this.width !== size.width || this.scrollWidth !== size.scrollWidth || this.scrollHeight !== size.scrollHeight) && !this.isAnimating) {
151
+ this.forceUpdate = false;
150
152
  this.height = size.height;
151
153
  this.width = size.width;
154
+ this.scrollHeight = size.scrollHeight;
155
+ this.scrollWidth = size.scrollWidth;
152
156
  this.childrenCurrentList = [];
153
157
  this.constructChildren(0, false);
154
158
  }
@@ -180,7 +184,7 @@ export default class ResizeComponent extends React.Component {
180
184
  let dataCount = 0;
181
185
  this.noSpaceForChildren = false;
182
186
 
183
- if (totalWidth <= moreWidth) {
187
+ if (totalWidth + moreWidth <= moreWidth) {
184
188
  this.noSpaceForChildren = true;
185
189
  } else {
186
190
  for (let i = 0; i < childrenWidthList.length; i++) {
@@ -199,6 +203,8 @@ export default class ResizeComponent extends React.Component {
199
203
  }
200
204
 
201
205
  break;
206
+ } else {
207
+ dataCount++;
202
208
  }
203
209
  }
204
210
  }
@@ -8,12 +8,16 @@ const mutationObserverOptions = {
8
8
  function getSize(element) {
9
9
  let {
10
10
  offsetHeight,
11
- offsetWidth
11
+ offsetWidth,
12
+ scrollHeight,
13
+ scrollWidth
12
14
  } = element; // const { height, width } = element.getBoundingClientRect();
13
15
 
14
16
  return {
15
17
  height: offsetHeight,
16
- width: offsetWidth
18
+ width: offsetWidth,
19
+ scrollHeight: scrollHeight,
20
+ scrollWidth: scrollWidth
17
21
  };
18
22
  }
19
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.0.0-temp-350",
3
+ "version": "1.0.0-temp-555",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "jsnext:main": "es/index.js",