sag_components 1.0.94 → 1.0.96
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.
|
@@ -54,7 +54,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
54
54
|
_ref$labelColor = _ref.labelColor,
|
|
55
55
|
labelColor = _ref$labelColor === void 0 ? "#1B30AA" : _ref$labelColor,
|
|
56
56
|
required = _ref.required,
|
|
57
|
-
|
|
57
|
+
inputRef = _ref.inputRef,
|
|
58
58
|
defaultValue = _ref.defaultValue,
|
|
59
59
|
_ref$allowedInput = _ref.allowedInput,
|
|
60
60
|
allowedInput = _ref$allowedInput === void 0 ? "all" : _ref$allowedInput;
|
|
@@ -174,15 +174,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
174
174
|
onInputChangeHandler(event, newInputValue);
|
|
175
175
|
},
|
|
176
176
|
disablePortal: true,
|
|
177
|
-
|
|
177
|
+
value: defaultValue
|
|
178
|
+
// defaultValue={getOptionByLabel(defaultValue)}
|
|
179
|
+
,
|
|
178
180
|
id: "combo-box",
|
|
179
181
|
options: options,
|
|
180
182
|
sx: {
|
|
181
183
|
width: width
|
|
182
184
|
},
|
|
183
185
|
popupIcon: showPopupIcon ? /*#__PURE__*/_react.default.createElement(_ArrowDropDownIcon.ArrowDropDownIcon, {
|
|
184
|
-
width: "0.
|
|
185
|
-
height: "0.
|
|
186
|
+
width: "0.5em",
|
|
187
|
+
height: "0.5em"
|
|
186
188
|
}) : null,
|
|
187
189
|
forcePopupIcon: "auto",
|
|
188
190
|
renderInput: function renderInput(params) {
|
|
@@ -194,7 +196,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
194
196
|
},
|
|
195
197
|
required: required,
|
|
196
198
|
label: text,
|
|
197
|
-
inputRef:
|
|
199
|
+
inputRef: inputRef ? inputRef : null,
|
|
198
200
|
size: size,
|
|
199
201
|
sx: getTextFieldStyle(),
|
|
200
202
|
placeholder: placeHolder,
|
|
@@ -248,8 +250,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
248
250
|
return option.label;
|
|
249
251
|
},
|
|
250
252
|
popupIcon: showPopupIcon ? /*#__PURE__*/_react.default.createElement(_ArrowDropDownIcon.ArrowDropDownIcon, {
|
|
251
|
-
width: "0.
|
|
252
|
-
height: "0.
|
|
253
|
+
width: "0.5em",
|
|
254
|
+
height: "0.5em"
|
|
253
255
|
}) : null,
|
|
254
256
|
renderOption: function renderOption(props, option, _ref2) {
|
|
255
257
|
var selected = _ref2.selected;
|
|
@@ -275,7 +277,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
275
277
|
event.preventDefault();
|
|
276
278
|
}
|
|
277
279
|
},
|
|
278
|
-
inputRef:
|
|
280
|
+
inputRef: inputRef ? inputRef : null,
|
|
279
281
|
required: required,
|
|
280
282
|
InputProps: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params.InputProps), {}, {
|
|
281
283
|
style: {
|
|
@@ -305,7 +307,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
305
307
|
event.preventDefault();
|
|
306
308
|
}
|
|
307
309
|
},
|
|
308
|
-
inputRef:
|
|
310
|
+
inputRef: inputRef ? inputRef : null,
|
|
309
311
|
required: required,
|
|
310
312
|
InputLabelProps: {
|
|
311
313
|
style: {
|