@idealyst/components 1.2.68 → 1.2.69

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": "@idealyst/components",
3
- "version": "1.2.68",
3
+ "version": "1.2.69",
4
4
  "description": "Shared component library for React and React Native",
5
5
  "documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
6
6
  "readme": "README.md",
@@ -56,7 +56,7 @@
56
56
  "publish:npm": "npm publish"
57
57
  },
58
58
  "peerDependencies": {
59
- "@idealyst/theme": "^1.2.68",
59
+ "@idealyst/theme": "^1.2.69",
60
60
  "@mdi/js": ">=7.0.0",
61
61
  "@mdi/react": ">=1.0.0",
62
62
  "@react-native-vector-icons/common": ">=12.0.0",
@@ -107,7 +107,7 @@
107
107
  },
108
108
  "devDependencies": {
109
109
  "@idealyst/blur": "^1.2.40",
110
- "@idealyst/theme": "^1.2.68",
110
+ "@idealyst/theme": "^1.2.69",
111
111
  "@idealyst/tooling": "^1.2.30",
112
112
  "@mdi/react": "^1.6.1",
113
113
  "@types/react": "^19.1.0",
@@ -1,4 +1,4 @@
1
- import { useState, forwardRef, useMemo, useEffect } from 'react';
1
+ import { useState, forwardRef, useMemo } from 'react';
2
2
  import { View, TextInput, NativeSyntheticEvent, TextInputContentSizeChangeEventData } from 'react-native';
3
3
  import { textAreaStyles } from './TextArea.styles';
4
4
  import Text from '../Text';
@@ -141,14 +141,6 @@ const TextArea = forwardRef<IdealystElement, TextAreaProps>(({
141
141
  setContentHeight(newHeight);
142
142
  };
143
143
 
144
- // Reset contentHeight when value is cleared externally (controlled component)
145
- // This forces the TextInput to recalculate its size
146
- useEffect(() => {
147
- if (autoGrow && value === '') {
148
- setContentHeight(undefined);
149
- }
150
- }, [value, autoGrow]);
151
-
152
144
  const showFooter = (error || helperText) || (showCharacterCount && maxLength);
153
145
 
154
146
  // Get dynamic styles - call as functions for theme reactivity
@@ -180,15 +172,10 @@ const TextArea = forwardRef<IdealystElement, TextAreaProps>(({
180
172
  textAlignVertical: autoGrow ? 'center' : 'top',
181
173
  backgroundColor: 'transparent',
182
174
  },
183
- // For autoGrow: use contentHeight if available, otherwise minHeight constraint
175
+ // For autoGrow: don't set height, let it grow naturally with minHeight constraint
184
176
  // For fixed height: use rows-based height
185
177
  autoGrow
186
- ? {
187
- minHeight: minHeight ?? 44,
188
- maxHeight: maxHeight,
189
- // Set explicit height when we have a calculated contentHeight
190
- ...(contentHeight !== undefined && { height: contentHeight }),
191
- }
178
+ ? { minHeight: minHeight ?? 44, maxHeight: maxHeight }
192
179
  : { height: rows * 24 },
193
180
  textareaStyle,
194
181
  ]}