@onehat/ui 0.3.203 → 0.3.205
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/package.json
CHANGED
|
@@ -56,6 +56,7 @@ export function ComboComponent(props) {
|
|
|
56
56
|
onGridAdd, // to hook into when menu adds (ComboEditor only)
|
|
57
57
|
onGridSave, // to hook into when menu saves (ComboEditor only)
|
|
58
58
|
onGridDelete, // to hook into when menu deletes (ComboEditor only)
|
|
59
|
+
newEntityDisplayProperty,
|
|
59
60
|
|
|
60
61
|
// withComponent
|
|
61
62
|
self,
|
|
@@ -685,6 +686,7 @@ export function ComboComponent(props) {
|
|
|
685
686
|
parent={self}
|
|
686
687
|
h={UiGlobals.mode === UI_MODE_WEB ? styles.FORM_COMBO_MENU_HEIGHT + 'px' : null}
|
|
687
688
|
newEntityDisplayValue={newEntityDisplayValue}
|
|
689
|
+
newEntityDisplayProperty={newEntityDisplayProperty}
|
|
688
690
|
disablePresetButtons={!isEditor}
|
|
689
691
|
alternateRowBackgrounds={false}
|
|
690
692
|
onChangeSelection={(selection) => {
|
|
@@ -38,6 +38,7 @@ export default function withEditor(WrappedComponent, isTree = false) {
|
|
|
38
38
|
onDelete,
|
|
39
39
|
onSave, // this could also be called 'onEdit'
|
|
40
40
|
newEntityDisplayValue,
|
|
41
|
+
newEntityDisplayProperty, // in case the field to set for newEntityDisplayValue is different from model
|
|
41
42
|
defaultValues,
|
|
42
43
|
|
|
43
44
|
// withComponent
|
|
@@ -115,7 +116,7 @@ export default function withEditor(WrappedComponent, isTree = false) {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
if (getNewEntityDisplayValue()) {
|
|
118
|
-
const displayPropertyName = Repository.getSchema().model.displayProperty;
|
|
119
|
+
const displayPropertyName = newEntityDisplayProperty || Repository.getSchema().model.displayProperty;
|
|
119
120
|
addValues[displayPropertyName] = getNewEntityDisplayValue();
|
|
120
121
|
}
|
|
121
122
|
|