@tamagui/tabs-headless 2.0.0-rc.4 → 2.0.0-rc.40
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/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useTabs.cjs +216 -169
- package/dist/cjs/useTabs.native.js +223 -179
- package/dist/cjs/useTabs.native.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/useTabs.mjs +187 -142
- package/dist/esm/useTabs.mjs.map +1 -1
- package/dist/esm/useTabs.native.js +194 -152
- package/dist/esm/useTabs.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/dist/jsx/useTabs.mjs +187 -142
- package/dist/jsx/useTabs.mjs.map +1 -1
- package/dist/jsx/useTabs.native.js +223 -179
- package/dist/jsx/useTabs.native.js.map +1 -1
- package/package.json +8 -11
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/useTabs.js +0 -210
- package/dist/cjs/useTabs.js.map +0 -6
- package/dist/esm/useTabs.js +0 -190
- package/dist/esm/useTabs.js.map +0 -6
- package/dist/jsx/useTabs.js +0 -190
- package/dist/jsx/useTabs.js.map +0 -6
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
|
package/dist/cjs/useTabs.cjs
CHANGED
|
@@ -2,33 +2,35 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
6
|
-
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
32
34
|
var useTabs_exports = {};
|
|
33
35
|
__export(useTabs_exports, {
|
|
34
36
|
TabsProvider: () => TabsProvider,
|
|
@@ -38,110 +40,153 @@ __export(useTabs_exports, {
|
|
|
38
40
|
useTabsContext: () => useTabsContext
|
|
39
41
|
});
|
|
40
42
|
module.exports = __toCommonJS(useTabs_exports);
|
|
41
|
-
var import_helpers = require("@tamagui/helpers")
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
var import_helpers = require("@tamagui/helpers");
|
|
44
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
45
|
+
var import_use_direction = require("@tamagui/use-direction");
|
|
46
|
+
var React = __toESM(require("react"), 1);
|
|
47
|
+
var import_react = require("react");
|
|
46
48
|
function useTabs(props = {}) {
|
|
47
49
|
const {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
nextTab =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
50
|
+
value: valueProp,
|
|
51
|
+
onValueChange,
|
|
52
|
+
defaultValue = "",
|
|
53
|
+
orientation = "horizontal",
|
|
54
|
+
dir,
|
|
55
|
+
activationMode = "automatic",
|
|
56
|
+
loop = true
|
|
57
|
+
} = props;
|
|
58
|
+
const direction = (0, import_use_direction.useDirection)(dir);
|
|
59
|
+
const baseId = (0, import_react.useId)();
|
|
60
|
+
const [value, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
61
|
+
prop: valueProp,
|
|
62
|
+
onChange: onValueChange,
|
|
63
|
+
defaultProp: defaultValue
|
|
64
|
+
});
|
|
65
|
+
const tabRefs = (0, import_react.useRef)(/* @__PURE__ */new Map());
|
|
66
|
+
const [tabValues, setTabValues] = (0, import_react.useState)([]);
|
|
67
|
+
const registerTab = (0, import_react.useCallback)((tabValue, element) => {
|
|
68
|
+
if (element) {
|
|
69
|
+
tabRefs.current.set(tabValue, element);
|
|
70
|
+
setTabValues(prev => prev.includes(tabValue) ? prev : [...prev, tabValue]);
|
|
71
|
+
} else {
|
|
72
|
+
tabRefs.current.delete(tabValue);
|
|
73
|
+
setTabValues(prev => prev.filter(v => v !== tabValue));
|
|
74
|
+
}
|
|
75
|
+
}, []);
|
|
76
|
+
const focusTab = (0, import_react.useCallback)(tabValue => {
|
|
77
|
+
const element = tabRefs.current.get(tabValue);
|
|
78
|
+
element?.focus();
|
|
79
|
+
}, []);
|
|
80
|
+
const getNextTab = (0, import_react.useCallback)((currentValue, direction2) => {
|
|
81
|
+
const currentIndex = tabValues.indexOf(currentValue);
|
|
82
|
+
if (currentIndex === -1) return null;
|
|
83
|
+
let nextIndex = currentIndex + direction2;
|
|
84
|
+
if (loop) {
|
|
85
|
+
nextIndex = (nextIndex + tabValues.length) % tabValues.length;
|
|
86
|
+
} else {
|
|
87
|
+
if (nextIndex < 0 || nextIndex >= tabValues.length) return null;
|
|
88
|
+
}
|
|
89
|
+
return tabValues[nextIndex] ?? null;
|
|
90
|
+
}, [tabValues, loop]);
|
|
91
|
+
const handleKeyDown = (0, import_react.useCallback)(tabValue => event => {
|
|
92
|
+
const isHorizontal = orientation === "horizontal";
|
|
93
|
+
const isRtl = direction === "rtl";
|
|
94
|
+
let nextTab = null;
|
|
95
|
+
switch (event.key) {
|
|
96
|
+
case "ArrowRight":
|
|
97
|
+
if (isHorizontal) {
|
|
98
|
+
nextTab = getNextTab(tabValue, isRtl ? -1 : 1);
|
|
99
|
+
}
|
|
100
|
+
break;
|
|
101
|
+
case "ArrowLeft":
|
|
102
|
+
if (isHorizontal) {
|
|
103
|
+
nextTab = getNextTab(tabValue, isRtl ? 1 : -1);
|
|
104
|
+
}
|
|
105
|
+
break;
|
|
106
|
+
case "ArrowDown":
|
|
107
|
+
if (!isHorizontal) {
|
|
108
|
+
nextTab = getNextTab(tabValue, 1);
|
|
109
|
+
}
|
|
110
|
+
break;
|
|
111
|
+
case "ArrowUp":
|
|
112
|
+
if (!isHorizontal) {
|
|
113
|
+
nextTab = getNextTab(tabValue, -1);
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
case "Home":
|
|
117
|
+
nextTab = tabValues[0] ?? null;
|
|
118
|
+
break;
|
|
119
|
+
case "End":
|
|
120
|
+
nextTab = tabValues[tabValues.length - 1] ?? null;
|
|
121
|
+
break;
|
|
122
|
+
case " ":
|
|
123
|
+
case "Enter":
|
|
124
|
+
if (activationMode === "manual") {
|
|
125
|
+
setValue(tabValue);
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (nextTab) {
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
focusTab(nextTab);
|
|
133
|
+
if (activationMode === "automatic") {
|
|
134
|
+
setValue(nextTab);
|
|
105
135
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
onFocus: event => {
|
|
128
|
-
registerTab(tabValue, event.currentTarget), !disabled && !isSelected && activationMode === "automatic" && setValue(tabValue);
|
|
136
|
+
}
|
|
137
|
+
}, [orientation, direction, getNextTab, tabValues, activationMode, setValue, focusTab]);
|
|
138
|
+
const getTabProps = (0, import_react.useCallback)((tabValue, disabled) => {
|
|
139
|
+
const isSelected = value === tabValue;
|
|
140
|
+
const triggerId = makeTriggerId(baseId, tabValue);
|
|
141
|
+
const contentId = makeContentId(baseId, tabValue);
|
|
142
|
+
return {
|
|
143
|
+
role: "tab",
|
|
144
|
+
id: triggerId,
|
|
145
|
+
"aria-selected": isSelected,
|
|
146
|
+
"aria-controls": contentId,
|
|
147
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
148
|
+
...(disabled && {
|
|
149
|
+
"data-disabled": ""
|
|
150
|
+
}),
|
|
151
|
+
disabled,
|
|
152
|
+
tabIndex: isSelected ? 0 : -1,
|
|
153
|
+
onKeyDown: disabled ? () => {} : handleKeyDown(tabValue),
|
|
154
|
+
onClick: event => {
|
|
155
|
+
if (!disabled && !isSelected) {
|
|
156
|
+
setValue(tabValue);
|
|
129
157
|
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
158
|
+
},
|
|
159
|
+
onFocus: event => {
|
|
160
|
+
registerTab(tabValue, event.currentTarget);
|
|
161
|
+
if (!disabled && !isSelected && activationMode === "automatic") {
|
|
162
|
+
setValue(tabValue);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
}, [value, baseId, handleKeyDown, setValue, activationMode, registerTab]);
|
|
167
|
+
const getContentProps = (0, import_react.useCallback)(tabValue => {
|
|
168
|
+
const isSelected = value === tabValue;
|
|
169
|
+
const triggerId = makeTriggerId(baseId, tabValue);
|
|
170
|
+
const contentId = makeContentId(baseId, tabValue);
|
|
171
|
+
return {
|
|
172
|
+
role: "tabpanel",
|
|
173
|
+
id: contentId,
|
|
174
|
+
"aria-labelledby": triggerId,
|
|
175
|
+
"data-state": isSelected ? "active" : "inactive",
|
|
176
|
+
"data-orientation": orientation,
|
|
177
|
+
hidden: !isSelected,
|
|
178
|
+
tabIndex: 0
|
|
179
|
+
};
|
|
180
|
+
}, [value, baseId, orientation]);
|
|
181
|
+
const contextValue = {
|
|
182
|
+
baseId,
|
|
183
|
+
value,
|
|
184
|
+
setValue,
|
|
185
|
+
orientation,
|
|
186
|
+
direction,
|
|
187
|
+
activationMode,
|
|
188
|
+
loop
|
|
189
|
+
};
|
|
145
190
|
return {
|
|
146
191
|
value,
|
|
147
192
|
setValue,
|
|
@@ -156,46 +201,40 @@ function useTabs(props = {}) {
|
|
|
156
201
|
},
|
|
157
202
|
getTabProps,
|
|
158
203
|
getContentProps,
|
|
159
|
-
contextValue
|
|
160
|
-
baseId,
|
|
161
|
-
value,
|
|
162
|
-
setValue,
|
|
163
|
-
orientation,
|
|
164
|
-
direction,
|
|
165
|
-
activationMode,
|
|
166
|
-
loop
|
|
167
|
-
}
|
|
204
|
+
contextValue
|
|
168
205
|
};
|
|
169
206
|
}
|
|
170
|
-
const TabsContext = React.createContext(null)
|
|
171
|
-
|
|
207
|
+
const TabsContext = React.createContext(null);
|
|
208
|
+
const TabsProvider = TabsContext.Provider;
|
|
172
209
|
function useTabsContext() {
|
|
173
210
|
const context = React.useContext(TabsContext);
|
|
174
|
-
if (!context)
|
|
211
|
+
if (!context) {
|
|
212
|
+
throw new Error("useTabsContext must be used within a TabsProvider");
|
|
213
|
+
}
|
|
175
214
|
return context;
|
|
176
215
|
}
|
|
177
216
|
function useTab(props) {
|
|
178
217
|
const {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
218
|
+
value: tabValue,
|
|
219
|
+
disabled,
|
|
220
|
+
onPress,
|
|
221
|
+
onKeyDown,
|
|
222
|
+
onFocus
|
|
223
|
+
} = props;
|
|
224
|
+
const context = useTabsContext();
|
|
225
|
+
const {
|
|
226
|
+
value,
|
|
227
|
+
setValue,
|
|
228
|
+
baseId,
|
|
229
|
+
activationMode,
|
|
230
|
+
orientation,
|
|
231
|
+
direction,
|
|
232
|
+
loop
|
|
233
|
+
} = context;
|
|
234
|
+
const isSelected = value === tabValue;
|
|
235
|
+
const triggerId = makeTriggerId(baseId, tabValue);
|
|
236
|
+
const contentId = makeContentId(baseId, tabValue);
|
|
237
|
+
const ref = (0, import_react.useRef)(null);
|
|
199
238
|
return {
|
|
200
239
|
isSelected,
|
|
201
240
|
tabProps: {
|
|
@@ -211,31 +250,39 @@ function useTab(props) {
|
|
|
211
250
|
disabled,
|
|
212
251
|
tabIndex: isSelected ? 0 : -1,
|
|
213
252
|
onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, event => {
|
|
214
|
-
|
|
253
|
+
if (disabled) return;
|
|
254
|
+
if ([" ", "Enter"].includes(event.key)) {
|
|
255
|
+
setValue(tabValue);
|
|
256
|
+
event.preventDefault();
|
|
257
|
+
}
|
|
215
258
|
}),
|
|
216
259
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, () => {
|
|
217
|
-
!disabled && !isSelected
|
|
260
|
+
if (!disabled && !isSelected) {
|
|
261
|
+
setValue(tabValue);
|
|
262
|
+
}
|
|
218
263
|
}),
|
|
219
264
|
onFocus: (0, import_helpers.composeEventHandlers)(onFocus, () => {
|
|
220
|
-
!disabled && !isSelected && activationMode === "automatic"
|
|
265
|
+
if (!disabled && !isSelected && activationMode === "automatic") {
|
|
266
|
+
setValue(tabValue);
|
|
267
|
+
}
|
|
221
268
|
})
|
|
222
269
|
}
|
|
223
270
|
};
|
|
224
271
|
}
|
|
225
272
|
function useTabContent(props) {
|
|
226
273
|
const {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
274
|
+
value: tabValue,
|
|
275
|
+
forceMount
|
|
276
|
+
} = props;
|
|
277
|
+
const context = useTabsContext();
|
|
278
|
+
const {
|
|
279
|
+
value,
|
|
280
|
+
baseId,
|
|
281
|
+
orientation
|
|
282
|
+
} = context;
|
|
283
|
+
const isSelected = value === tabValue;
|
|
284
|
+
const triggerId = makeTriggerId(baseId, tabValue);
|
|
285
|
+
const contentId = makeContentId(baseId, tabValue);
|
|
239
286
|
return {
|
|
240
287
|
isSelected,
|
|
241
288
|
shouldMount: forceMount || isSelected,
|