@etsoo/materialui 1.2.24 → 1.2.26

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/lib/Tiplist.js CHANGED
@@ -11,7 +11,7 @@ import { InputField } from "./InputField";
11
11
  * @returns Component
12
12
  */
13
13
  export function Tiplist(props) {
14
- var _a;
14
+ var _a, _b;
15
15
  // Labels
16
16
  const { noOptions, loading, more, open: openDefault } = (_a = globalApp === null || globalApp === void 0 ? void 0 : globalApp.getLabels("noOptions", "loading", "more", "open")) !== null && _a !== void 0 ? _a : {};
17
17
  // Destruct
@@ -158,7 +158,7 @@ export function Tiplist(props) {
158
158
  }, []);
159
159
  // Layout
160
160
  return (React.createElement("div", null,
161
- React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: "none" }, name: name, value: `${inputValue !== null && inputValue !== void 0 ? inputValue : ""}`, readOnly: true, onChange: inputOnChange }),
161
+ React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: "none" }, name: name, value: `${(_b = inputValue !== null && inputValue !== void 0 ? inputValue : localIdValue) !== null && _b !== void 0 ? _b : ""}`, readOnly: true, onChange: inputOnChange }),
162
162
  React.createElement(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
163
163
  // Set value
164
164
  setInputValue(value);
@@ -169,7 +169,7 @@ export function Tiplist(props) {
169
169
  onValueChange(value);
170
170
  // For clear case
171
171
  if (reason === "clear") {
172
- stateUpdate({ options: [] });
172
+ stateUpdate({ options: [], open: true });
173
173
  loadDataDirect();
174
174
  }
175
175
  }, open: states.open, openOnFocus: openOnFocus, onOpen: () => {
package/lib/TiplistPro.js CHANGED
@@ -9,7 +9,7 @@ import { globalApp } from "./app/ReactApp";
9
9
  * @returns Component
10
10
  */
11
11
  export function TiplistPro(props) {
12
- var _a;
12
+ var _a, _b;
13
13
  // Labels
14
14
  const { noOptions, loading, more, open: openDefault } = (_a = globalApp === null || globalApp === void 0 ? void 0 : globalApp.getLabels("noOptions", "loading", "more", "open")) !== null && _a !== void 0 ? _a : {};
15
15
  // Destruct
@@ -145,7 +145,7 @@ export function TiplistPro(props) {
145
145
  }, []);
146
146
  // Layout
147
147
  return (React.createElement("div", null,
148
- React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: "none" }, name: name, value: inputValue !== null && inputValue !== void 0 ? inputValue : "", readOnly: true, onChange: inputOnChange }),
148
+ React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: "none" }, name: name, value: (_b = inputValue !== null && inputValue !== void 0 ? inputValue : localIdValue) !== null && _b !== void 0 ? _b : "", readOnly: true, onChange: inputOnChange }),
149
149
  React.createElement(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, freeSolo: true, clearOnBlur: false, onChange: (event, value, reason, details) => {
150
150
  if (typeof value === "object") {
151
151
  // Set value
@@ -160,7 +160,7 @@ export function TiplistPro(props) {
160
160
  }
161
161
  // For clear case
162
162
  if (reason === "clear") {
163
- stateUpdate({ options: [] });
163
+ stateUpdate({ options: [], open: true });
164
164
  loadDataDirect();
165
165
  }
166
166
  }, open: states.open, openOnFocus: openOnFocus, onOpen: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -56,10 +56,10 @@
56
56
  "@etsoo/shared": "^1.2.1",
57
57
  "@mui/icons-material": "^5.11.16",
58
58
  "@mui/material": "^5.12.3",
59
- "@mui/x-data-grid": "^6.3.0",
59
+ "@mui/x-data-grid": "^6.3.1",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
- "@types/react": "^18.2.2",
62
+ "@types/react": "^18.2.5",
63
63
  "@types/react-avatar-editor": "^13.0.0",
64
64
  "@types/react-dom": "^18.2.3",
65
65
  "@types/react-input-mask": "^3.0.2",
package/src/Tiplist.tsx CHANGED
@@ -271,7 +271,7 @@ export function Tiplist<
271
271
  type="text"
272
272
  style={{ display: "none" }}
273
273
  name={name}
274
- value={`${inputValue ?? ""}`}
274
+ value={`${inputValue ?? localIdValue ?? ""}`}
275
275
  readOnly
276
276
  onChange={inputOnChange}
277
277
  />
@@ -291,7 +291,7 @@ export function Tiplist<
291
291
 
292
292
  // For clear case
293
293
  if (reason === "clear") {
294
- stateUpdate({ options: [] });
294
+ stateUpdate({ options: [], open: true });
295
295
  loadDataDirect();
296
296
  }
297
297
  }}
@@ -278,7 +278,7 @@ export function TiplistPro<T extends ListType2 = ListType2>(
278
278
  type="text"
279
279
  style={{ display: "none" }}
280
280
  name={name}
281
- value={inputValue ?? ""}
281
+ value={inputValue ?? localIdValue ?? ""}
282
282
  readOnly
283
283
  onChange={inputOnChange}
284
284
  />
@@ -305,7 +305,7 @@ export function TiplistPro<T extends ListType2 = ListType2>(
305
305
 
306
306
  // For clear case
307
307
  if (reason === "clear") {
308
- stateUpdate({ options: [] });
308
+ stateUpdate({ options: [], open: true });
309
309
  loadDataDirect();
310
310
  }
311
311
  }}