@ringcentral/juno 2.19.0 → 2.19.2

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.
@@ -187,7 +187,7 @@ declare type RcDownshiftProps<T extends RcDownshiftSelectedItem = RcDownshiftSel
187
187
  */
188
188
  PopperComponent?: ComponentType<RcPopperProps>;
189
189
  /** props for apply on `RcPopper` */
190
- PopperProps?: RcBaseProps<Partial<RcPopperProps>, 'open' | 'keepMounted' | 'anchorEl' | 'style'> & {
190
+ PopperProps?: RcBaseProps<Partial<RcPopperProps>, 'open' | 'keepMounted' | 'anchorEl'> & {
191
191
  /**
192
192
  * typeof that popper `anchorEl` binding when menu open
193
193
  *
@@ -247,12 +247,12 @@ exports.useDownshift = function (_a) {
247
247
  var currIndex = highlightedIndexRef.current;
248
248
  var availableIndex_1 = getNextFocusableOption(currIndex);
249
249
  if (currIndex !== availableIndex_1) {
250
- setTimeout(function () {
250
+ requestAnimationFrame(function () {
251
251
  setHighlightedIndex(availableIndex_1, {
252
252
  reason: 'auto',
253
253
  reRender: true,
254
254
  });
255
- }, 0);
255
+ });
256
256
  }
257
257
  }
258
258
  }
@@ -12,12 +12,12 @@ function useHighlightScroll(_a) {
12
12
  if (topHighlightIndex === void 0) { topHighlightIndex = 0; }
13
13
  if (!scrollerRef.current) {
14
14
  if (currHighlightedIndex !== topHighlightIndex) {
15
- setTimeout(function () {
15
+ requestAnimationFrame(function () {
16
16
  scrollToIndex({
17
17
  index: currHighlightedIndex,
18
18
  align: 'start',
19
19
  });
20
- }, 0);
20
+ });
21
21
  }
22
22
  return;
23
23
  }
@@ -245,12 +245,12 @@ export var useDownshift = function (_a) {
245
245
  var currIndex = highlightedIndexRef.current;
246
246
  var availableIndex_1 = getNextFocusableOption(currIndex);
247
247
  if (currIndex !== availableIndex_1) {
248
- setTimeout(function () {
248
+ requestAnimationFrame(function () {
249
249
  setHighlightedIndex(availableIndex_1, {
250
250
  reason: 'auto',
251
251
  reRender: true,
252
252
  });
253
- }, 0);
253
+ });
254
254
  }
255
255
  }
256
256
  }
@@ -10,12 +10,12 @@ export function useHighlightScroll(_a) {
10
10
  if (topHighlightIndex === void 0) { topHighlightIndex = 0; }
11
11
  if (!scrollerRef.current) {
12
12
  if (currHighlightedIndex !== topHighlightIndex) {
13
- setTimeout(function () {
13
+ requestAnimationFrame(function () {
14
14
  scrollToIndex({
15
15
  index: currHighlightedIndex,
16
16
  align: 'start',
17
17
  });
18
- }, 0);
18
+ });
19
19
  }
20
20
  return;
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "2.19.0",
3
+ "version": "2.19.2",
4
4
  "author": "RingCentral",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",