@korsolutions/ui 0.0.66 → 0.0.67
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/dist/module/components/combobox/components/combobox-trigger.js +3 -3
- package/dist/module/components/combobox/components/combobox-trigger.js.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-trigger.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/combobox/components/combobox-trigger.tsx +3 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useRef } from "react";
|
|
4
4
|
import { StyleSheet, TextInput } from "react-native";
|
|
5
|
+
import { setInnerInputValue } from "../../../utils/input-utils.js";
|
|
5
6
|
import { measureLayoutPosition } from "../../../utils/normalize-layout.js";
|
|
6
7
|
import { useCombobox } from "../context.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -27,9 +28,8 @@ export function ComboboxTrigger(props) {
|
|
|
27
28
|
});
|
|
28
29
|
};
|
|
29
30
|
useEffect(() => {
|
|
30
|
-
triggerRef.current
|
|
31
|
-
|
|
32
|
-
});
|
|
31
|
+
if (!triggerRef.current) return;
|
|
32
|
+
setInnerInputValue(triggerRef.current, displayValue);
|
|
33
33
|
}, [displayValue]);
|
|
34
34
|
useEffect(() => {
|
|
35
35
|
if (!combobox.isOpen) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","StyleSheet","TextInput","measureLayoutPosition","useCombobox","jsx","_jsx","calculateState","isDisabled","isOpen","ComboboxTrigger","props","combobox","triggerRef","triggerState","selectedOption","options","find","option","value","displayValue","searchQuery","label","open","setSearchQuery","requestAnimationFrame","current","layout","setTriggerPosition","setIsOpen","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","StyleSheet","TextInput","setInnerInputValue","measureLayoutPosition","useCombobox","jsx","_jsx","calculateState","isDisabled","isOpen","ComboboxTrigger","props","combobox","triggerRef","triggerState","selectedOption","options","find","option","value","displayValue","searchQuery","label","open","setSearchQuery","requestAnimationFrame","current","layout","setTriggerPosition","setIsOpen","blur","triggerStyles","styles","trigger","composedProps","default","style","flatten","composedStyle","ref","undefined","onChange","onChangeText","text","onFocus"],"sourceRoot":"../../../../../src","sources":["components/combobox/components/combobox-trigger.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,UAAU,EAAEC,SAAS,QAA6B,cAAc;AAEzE,SAASC,kBAAkB,QAAQ,+BAA4B;AAC/D,SAASC,qBAAqB,QAAQ,oCAAiC;AACvE,SAASC,WAAW,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOzC,MAAMC,cAAc,GAAGA,CACrBC,UAAmB,EACnBC,MAAe,KACU;EACzB,IAAID,UAAU,EAAE,OAAO,UAAU;EACjC,IAAIC,MAAM,EAAE,OAAO,SAAS;EAC5B,OAAO,SAAS;AAClB,CAAC;AAED,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,MAAMC,QAAQ,GAAGR,WAAW,CAAC,CAAC;EAC9B,MAAMS,UAAU,GAAGd,MAAM,CAAe,IAAI,CAAC;EAE7C,MAAMe,YAAY,GAAGP,cAAc,CAACK,QAAQ,CAACJ,UAAU,EAAEI,QAAQ,CAACH,MAAM,CAAC;EACzE,MAAMM,cAAc,GAAGH,QAAQ,CAACI,OAAO,CAACC,IAAI,CACzCC,MAAM,IAAKA,MAAM,CAACC,KAAK,KAAKP,QAAQ,CAACO,KACxC,CAAC;EAED,MAAMC,YAAY,GAAGR,QAAQ,CAACH,MAAM,GAChCG,QAAQ,CAACS,WAAW,GACpBN,cAAc,GACZ,OAAOA,cAAc,CAACO,KAAK,KAAK,QAAQ,GACtCP,cAAc,CAACO,KAAK,GACpBP,cAAc,CAACI,KAAK,GACtB,EAAE;EAER,MAAMI,IAAI,GAAGA,CAAA,KAAM;IACjB,IAAIX,QAAQ,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qB,SAAU;IACjBC,QAAQ,EAAED,SAAU;IACpBE,YAAY,EAAGC,IAAI,IAAK;MACtB,IAAI/B,QAAQ,CAACJ,UAAU,EAAE;MACzBI,QAAQ,CAACY,cAAc,CAACmB,IAAI,CAAC;MAC7B,IAAI,CAAC/B,QAAQ,CAACH,MAAM,EAAE;QACpBc,IAAI,CAAC,CAAC;MACR;IACF,CAAE;IACFqB,OAAO,EAAEA,CAAA,KAAM;MACb,IAAI,CAAChC,QAAQ,CAACH,MAAM,EAAE;QACpBc,IAAI,CAAC,CAAC;MACR;IACF,CAAE;IACFa,KAAK,EAAEE;EAAc,CACtB,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-trigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/combobox/components/combobox-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"combobox-trigger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/combobox/components/combobox-trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBA4E1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from "react";
|
|
2
2
|
import { StyleSheet, TextInput, type TextInputProps } from "react-native";
|
|
3
3
|
import type { TextInputRef } from "../../../types/element.types";
|
|
4
|
+
import { setInnerInputValue } from "../../../utils/input-utils";
|
|
4
5
|
import { measureLayoutPosition } from "../../../utils/normalize-layout";
|
|
5
6
|
import { useCombobox } from "../context";
|
|
6
7
|
import type { ComboboxTriggerState } from "../types";
|
|
@@ -47,7 +48,8 @@ export function ComboboxTrigger(props: ComboboxTriggerProps) {
|
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
useEffect(() => {
|
|
50
|
-
triggerRef.current
|
|
51
|
+
if (!triggerRef.current) return;
|
|
52
|
+
setInnerInputValue(triggerRef.current, displayValue);
|
|
51
53
|
}, [displayValue]);
|
|
52
54
|
|
|
53
55
|
useEffect(() => {
|