@skyscanner/backpack-web 37.4.0 → 37.4.1

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.
@@ -1,4 +1,4 @@
1
- import type { ReactNode, ElementType, CSSProperties } from 'react';
1
+ import type { ReactNode, ElementType, CSSProperties, UIEvent } from 'react';
2
2
  import { Component } from 'react';
3
3
  import type { DebouncedFunc } from 'lodash';
4
4
  declare const computeScrollBarAwareHeight: (scrollerEl: HTMLElement | null, innerEl: HTMLElement | null) => string | null;
@@ -13,6 +13,7 @@ type Props = {
13
13
  scrollerRef?: (el: HTMLElement | null) => void;
14
14
  style?: CSSProperties;
15
15
  showScrollbar?: boolean;
16
+ onScroll?: (event: UIEvent) => void;
16
17
  };
17
18
  type State = {
18
19
  computedHeight: string;
@@ -109,6 +109,7 @@ class BpkMobileScrollContainer extends Component {
109
109
  className,
110
110
  innerContainerTagName = 'div',
111
111
  leadingIndicatorClassName,
112
+ onScroll,
112
113
  scrollerRef,
113
114
  showScrollbar,
114
115
  style,
@@ -137,7 +138,12 @@ class BpkMobileScrollContainer extends Component {
137
138
  }
138
139
  this.scrollerEl = el;
139
140
  },
140
- onScroll: this.setScrollIndicatorClassName,
141
+ onScroll: event => {
142
+ this.setScrollIndicatorClassName();
143
+ if (onScroll) {
144
+ onScroll(event);
145
+ }
146
+ },
141
147
  className: scrollerClassNames,
142
148
  children: /*#__PURE__*/_jsx(InnerContainer, {
143
149
  "aria-label": ariaLabel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "37.4.0",
3
+ "version": "37.4.1",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",