@onehat/ui 0.3.83 → 0.3.84

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.83",
3
+ "version": "0.3.84",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -36,6 +36,7 @@ function TabBar(props) {
36
36
  startsCollapsed = true,
37
37
  onChangeCurrentTab,
38
38
  onChangeIsCollapsed,
39
+ onPressTab,
39
40
  onTabClose,
40
41
  ...propsToPass
41
42
  } = props,
@@ -60,6 +61,9 @@ function TabBar(props) {
60
61
  },
61
62
  setCurrentTab = (ix) => {
62
63
  if ((useLocal && ix === currentTabIxLocal) || ix === currentTabIx) {
64
+ if (onPressTab) {
65
+ onPressTab(ix); // for when an already shown tab is pressed
66
+ }
63
67
  return; // no change
64
68
  }
65
69
  if (useLocal) {