ish-ui 1.0.46 → 1.0.47

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.
@@ -274,16 +274,16 @@ function EditInPlaceSearchSelect({ label, disabled, className, labelAdornment, i
274
274
  return input.value || null;
275
275
  }, [input.value, multiple, selectValueMark, sortedItems]);
276
276
  const renderedPlaceholder = useMemo(() => {
277
- const rendered = placeholder;
278
- return multiple && inputValue.length ? null : rendered;
277
+ return multiple && inputValue.length ? null : placeholder;
279
278
  }, [multiple, placeholder, isEditing, inputValue]);
280
279
  const renderInput = useCallback((_a) => {
281
- var { InputLabelProps, InputProps, inputProps } = _a, params = __rest(_a, ["InputLabelProps", "InputProps", "inputProps"]);
282
- return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, key: input.name, name: input.name, value: (isEditing ? searchValue : (typeof displayedValue === 'string' ? displayedValue : '')), error: error, invalid: hasError || invalid, inline: inline, label: label, warning: warning, fieldClasses: fieldClasses, rightAligned: rightAligned, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: renderedPlaceholder, editIcon: !hideEditIcon && renderIcons, InputProps: Object.assign(Object.assign({}, InputProps), { endAdornment: null, onChange: handleInputChange, onFocus: edit, onClick: onEditButtonFocus, onBlur,
280
+ var { InputProps, inputProps } = _a, params = __rest(_a, ["InputProps", "inputProps"]);
281
+ const value = (isEditing ? searchValue : (typeof displayedValue === 'string' ? displayedValue : ''));
282
+ return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, key: input.name, name: input.name, value: value, error: error, invalid: hasError || invalid, inline: inline, label: label, warning: warning, fieldClasses: fieldClasses, rightAligned: rightAligned, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: renderedPlaceholder, editIcon: !hideEditIcon && renderIcons, InputProps: Object.assign(Object.assign({}, InputProps), { endAdornment: null, onChange: handleInputChange, onFocus: edit, onClick: onEditButtonFocus, onBlur,
283
283
  disableUnderline, classes: {
284
284
  underline: fieldClasses.underline,
285
285
  input: clsx(disabled && classes.readonly, fieldClasses.text),
286
- }, inputProps: Object.assign(Object.assign({}, inputProps), { className: clsx(fieldClasses.text, 'mr-auto', inputProps.className), ref: ref => {
286
+ }, inputProps: Object.assign(Object.assign({}, inputProps), { value: multiple ? inputProps.value : value, className: clsx(fieldClasses.text, 'mr-auto', inputProps.className), ref: ref => {
287
287
  inputProps.ref.current = ref;
288
288
  inputNode.current = ref;
289
289
  if (inputRef)
@@ -312,6 +312,7 @@ function EditInPlaceSearchSelect({ label, disabled, className, labelAdornment, i
312
312
  input,
313
313
  labelAdornment,
314
314
  renderedPlaceholder,
315
+ renderValue,
315
316
  hideEditIcon,
316
317
  renderIcons,
317
318
  disableUnderline,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ish-ui",
3
3
  "sideEffects": false,
4
- "version": "1.0.46",
4
+ "version": "1.0.47",
5
5
  "description": "UI elements for onCourse and other ish apps",
6
6
  "main": "main.ts",
7
7
  "devDependencies": {