@danikokonn/yarik-frontend-lib 2.0.58-test14 → 2.0.58-test16
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichFilterTextField.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/RichFilterTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAUf,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAKlE,QAAA,MAAM,mBAAmB,GAAI,4HAS1B,wBAAwB,
|
|
1
|
+
{"version":3,"file":"RichFilterTextField.d.ts","sourceRoot":"","sources":["../../../src/components/RichFilterTextField/RichFilterTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAUf,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAKlE,QAAA,MAAM,mBAAmB,GAAI,4HAS1B,wBAAwB,sBA0Q1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -25,6 +25,10 @@ const RichFilterTextField = ({ filterExpr, filterExprHist, fields, operators, ad
|
|
|
25
25
|
const currentHintOptions = (cursorPos != null
|
|
26
26
|
? getHints(search, cursorPos, fields, operators)
|
|
27
27
|
: null) ?? new Map();
|
|
28
|
+
console.log("######## RENDER ########");
|
|
29
|
+
console.log(search);
|
|
30
|
+
console.log(cursorPos);
|
|
31
|
+
console.log(currentHintOptions);
|
|
28
32
|
const inputAnchor = currentHintOptions?.size > 0 ? textFieldRef.current : null;
|
|
29
33
|
useEffect(() => {
|
|
30
34
|
if (cursorPos == null)
|
|
@@ -155,7 +159,10 @@ const RichFilterTextField = ({ filterExpr, filterExprHist, fields, operators, ad
|
|
|
155
159
|
}
|
|
156
160
|
};
|
|
157
161
|
return (React.createElement(React.Fragment, null,
|
|
158
|
-
React.createElement(TextField, { ref: textFieldRef, inputRef: inputRef, fullWidth: true, size: "small", value: search, title: search, multiline: true, maxRows: 1, onChange: (e) =>
|
|
162
|
+
React.createElement(TextField, { ref: textFieldRef, inputRef: inputRef, fullWidth: true, size: "small", value: search, title: search, multiline: true, maxRows: 1, onChange: (e) => {
|
|
163
|
+
(instant ? handleChange : setSearch)(e.target.value);
|
|
164
|
+
setCursorPos(inputRef.current?.selectionStart ?? null);
|
|
165
|
+
},
|
|
159
166
|
// onClick={(e) => {
|
|
160
167
|
// if (e.target !== e.currentTarget) return;
|
|
161
168
|
// setCursorPos(inputRef.current?.selectionStart ?? null);
|