@websolutespa/bom-mixer-hooks 1.8.9 → 1.8.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @websolutespa/bom-mixer-hooks
2
2
 
3
+ ## 1.8.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 88267c3: Modified: useAutosizeTextArea
8
+
3
9
  ## 1.8.9
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -291,8 +291,8 @@ var import_react3 = require("react");
291
291
  function useAutosizeTextArea(textAreaRef, value) {
292
292
  (0, import_react3.useEffect)(() => {
293
293
  if (textAreaRef) {
294
- textAreaRef.style.height = "0px";
295
- textAreaRef.style.height = textAreaRef.scrollHeight + 1 + "px";
294
+ textAreaRef.style.minHeight = "0px";
295
+ textAreaRef.style.minHeight = textAreaRef.scrollHeight + "px";
296
296
  }
297
297
  }, [textAreaRef, value]);
298
298
  }
package/dist/index.mjs CHANGED
@@ -144,8 +144,8 @@ import { useEffect as useEffect2 } from "react";
144
144
  function useAutosizeTextArea(textAreaRef, value) {
145
145
  useEffect2(() => {
146
146
  if (textAreaRef) {
147
- textAreaRef.style.height = "0px";
148
- textAreaRef.style.height = textAreaRef.scrollHeight + 1 + "px";
147
+ textAreaRef.style.minHeight = "0px";
148
+ textAreaRef.style.minHeight = textAreaRef.scrollHeight + "px";
149
149
  }
150
150
  }, [textAreaRef, value]);
151
151
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-hooks",
3
- "version": "1.8.9",
3
+ "version": "1.8.10",
4
4
  "description": "Mixer Hooks module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -6,8 +6,8 @@ export function useAutosizeTextArea(
6
6
  ) {
7
7
  useEffect(() => {
8
8
  if (textAreaRef) {
9
- textAreaRef.style.height = '0px';
10
- textAreaRef.style.height = textAreaRef.scrollHeight + 1 + 'px';
9
+ textAreaRef.style.minHeight = '0px';
10
+ textAreaRef.style.minHeight = textAreaRef.scrollHeight + 'px';
11
11
  }
12
12
  }, [textAreaRef, value]);
13
13
  }