@xaui/native 0.2.3 → 0.2.4

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.
@@ -197,12 +197,13 @@ function toTabItems(children) {
197
197
  if (!_react2.default.isValidElement(child) || child.type !== Tab) {
198
198
  return [];
199
199
  }
200
- if (child.key == null) {
200
+ const tabKey = child.props.tabKey;
201
+ if (!tabKey) {
201
202
  return [];
202
203
  }
203
204
  return [
204
205
  {
205
- key: String(child.key),
206
+ key: tabKey,
206
207
  title: child.props.title,
207
208
  startContent: child.props.startContent,
208
209
  endContent: child.props.endContent,
@@ -31,6 +31,10 @@ type TabsItem = {
31
31
  content?: ReactNode;
32
32
  };
33
33
  type TabProps = {
34
+ /**
35
+ * Unique identifier for the tab. Used for selection, disabled state, and content rendering.
36
+ */
37
+ tabKey: string;
34
38
  /**
35
39
  * Label content for the tab trigger.
36
40
  */
@@ -31,6 +31,10 @@ type TabsItem = {
31
31
  content?: ReactNode;
32
32
  };
33
33
  type TabProps = {
34
+ /**
35
+ * Unique identifier for the tab. Used for selection, disabled state, and content rendering.
36
+ */
37
+ tabKey: string;
34
38
  /**
35
39
  * Label content for the tab trigger.
36
40
  */
@@ -197,12 +197,13 @@ function toTabItems(children) {
197
197
  if (!React.isValidElement(child) || child.type !== Tab) {
198
198
  return [];
199
199
  }
200
- if (child.key == null) {
200
+ const tabKey = child.props.tabKey;
201
+ if (!tabKey) {
201
202
  return [];
202
203
  }
203
204
  return [
204
205
  {
205
- key: String(child.key),
206
+ key: tabKey,
206
207
  title: child.props.title,
207
208
  startContent: child.props.startContent,
208
209
  endContent: child.props.endContent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaui/native",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Flutter-inspired React Native UI components with native animations powered by React Native Reanimated",
5
5
  "keywords": [
6
6
  "react-native",