@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:
|
|
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
package/src/mu/Tiplist.tsx
CHANGED
|
@@ -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={
|
|
222
|
+
value={
|
|
223
|
+
(states.value && Reflect.get(states.value, idField)) ?? ''
|
|
224
|
+
}
|
|
223
225
|
readOnly
|
|
224
226
|
onChange={inputOnChange}
|
|
225
227
|
/>
|