@etsoo/react 1.4.74 → 1.4.75

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.
@@ -22,7 +22,6 @@ export function MobileListItemRenderer({ data, itemHeight, margins }, renderer)
22
22
  // Loading
23
23
  if (data == null)
24
24
  return React.createElement(LinearProgress, null);
25
- console.log('margins', margins);
26
25
  // Elements
27
26
  const [title, subheader, actions, children, cardActions] = renderer(data);
28
27
  return (React.createElement(Card, { sx: {
package/lib/mu/Tiplist.js CHANGED
@@ -10,6 +10,7 @@ import { SearchField } from './SearchField';
10
10
  * @returns Component
11
11
  */
12
12
  export function Tiplist(props) {
13
+ var _a;
13
14
  // Destruct
14
15
  const { search = false, idField = 'id', idValue, inputAutoComplete = 'off', inputError, inputHelperText, inputMargin, inputOnChange, inputRequired, inputVariant, label, loadData, defaultValue, value, name, readOnly, onChange, openOnFocus = true, sx = { minWidth: '180px' }, ...rest } = props;
15
16
  // Value input ref
@@ -133,7 +134,7 @@ export function Tiplist(props) {
133
134
  }, []);
134
135
  // Layout
135
136
  return (React.createElement("div", null,
136
- React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: 'none' }, name: name, value: localIdValue !== null && localIdValue !== void 0 ? localIdValue : '', readOnly: true, onChange: inputOnChange }),
137
+ React.createElement("input", { ref: inputRef, "data-reset": "true", type: "text", style: { display: 'none' }, name: name, value: (_a = (states.value && Reflect.get(states.value, idField))) !== null && _a !== void 0 ? _a : '', readOnly: true, onChange: inputOnChange }),
137
138
  React.createElement(Autocomplete, { filterOptions: (options, _state) => options, value: states.value, options: states.options, onChange: (event, value, reason, details) => {
138
139
  // Set value
139
140
  setInputValue(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.4.74",
3
+ "version": "1.4.75",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -36,8 +36,6 @@ export function MobileListItemRenderer<T>(
36
36
  // Loading
37
37
  if (data == null) return <LinearProgress />;
38
38
 
39
- console.log('margins', margins);
40
-
41
39
  // Elements
42
40
  const [title, subheader, actions, children, cardActions] = renderer(data);
43
41
 
@@ -219,7 +219,9 @@ export function Tiplist<T extends {} = IdLabelDto>(props: TiplistProps<T>) {
219
219
  type="text"
220
220
  style={{ display: 'none' }}
221
221
  name={name}
222
- value={localIdValue ?? ''}
222
+ value={
223
+ (states.value && Reflect.get(states.value, idField)) ?? ''
224
+ }
223
225
  readOnly
224
226
  onChange={inputOnChange}
225
227
  />