next-helios-fe 1.8.84 → 1.8.85

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": "next-helios-fe",
3
- "version": "1.8.84",
3
+ "version": "1.8.85",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -35,14 +35,16 @@ export const Textarea: React.FC<TextareaProps> = ({
35
35
  : "py-1.5";
36
36
 
37
37
  useEffect(() => {
38
- if (maxRows && rest.value && (rest.value as string)?.includes("\n")) {
39
- if (((rest.value as string).match(/\n/g) || []).length < maxRows) {
40
- setTempRows(((rest.value as string).match(/\n/g) || []).length + 1);
38
+ if (maxRows) {
39
+ if (rest.value && (rest.value as string)?.includes("\n")) {
40
+ if (((rest.value as string).match(/\n/g) || []).length < maxRows) {
41
+ setTempRows(((rest.value as string).match(/\n/g) || []).length + 1);
42
+ }
43
+ } else {
44
+ setTempRows(rows || 10);
41
45
  }
42
- } else {
43
- setTempRows(1);
44
46
  }
45
- }, [maxRows, rest.value]);
47
+ }, [rows, maxRows, rest.value]);
46
48
 
47
49
  return (
48
50
  <label className={`flex flex-col gap-2 ${width}`}>