@colisweb/rescript-toolkit 5.0.2 → 5.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -32,11 +32,15 @@ let make = (
32
32
  ~isInvalid=?,
33
33
  ~className="",
34
34
  ) => {
35
+ let textareaRef = React.useRef(Js.Nullable.null)
36
+
35
37
  let onChange = event => {
36
38
  onChange->Option.map(onChange => onChange(event))->ignore
39
+ textareaRef.current->Js.Nullable.toOption->Option.forEach(autoExpand)
37
40
  }
38
41
 
39
42
  <textarea
43
+ ref={ReactDOM.Ref.domRef(textareaRef)}
40
44
  style={ReactDOM.Style.make(
41
45
  ~height="auto",
42
46
  ~minHeight="38px",
@@ -2,6 +2,7 @@ type barcodeOptions = {
2
2
  format?: string,
3
3
  height?: float,
4
4
  fontSize?: float,
5
+ background?: string,
5
6
  }
6
7
  @module("jsbarcode")
7
8
  external generate: (string, string, barcodeOptions) => unit = "default"