@arquimedes.co/eureka-forms 1.9.15-test → 1.9.16-test
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.
|
@@ -77,7 +77,9 @@ function AYFStepMapper(props) {
|
|
|
77
77
|
case AYFFormStepTypes.AYF_END_MONTH:
|
|
78
78
|
return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, getOptions: getMonths, getOptionSelected: function (option, value) {
|
|
79
79
|
return option.id === value.id;
|
|
80
|
-
},
|
|
80
|
+
}, defaultValue: props.step.type === AYFFormStepTypes.AYF_START_MONTH
|
|
81
|
+
? { id: '1', label: 'Enero' }
|
|
82
|
+
: { id: '12', label: 'Diciembre' }, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; }, icon: _jsx(CalendarTodayRoundedIcon, { fontSize: "inherit", style: {
|
|
81
83
|
color: '#757575',
|
|
82
84
|
fontSize: 20,
|
|
83
85
|
marginRight: 4,
|
package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js
CHANGED
|
@@ -196,8 +196,8 @@ function SmartSelect(_a) {
|
|
|
196
196
|
})] }));
|
|
197
197
|
}
|
|
198
198
|
function SmartSelectStep(props) {
|
|
199
|
-
var _a;
|
|
200
|
-
return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: (_a = props.originalValues[props.step.id]) !== null && _a !== void 0 ? _a : null, rules: {
|
|
199
|
+
var _a, _b;
|
|
200
|
+
return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: (_b = (_a = props.originalValues[props.step.id]) !== null && _a !== void 0 ? _a : props.defaultValue) !== null && _b !== void 0 ? _b : null, rules: {
|
|
201
201
|
required: props.step.required
|
|
202
202
|
? 'Este campo es obligatorio'
|
|
203
203
|
: undefined,
|
|
@@ -25,6 +25,8 @@ export interface SmartSelectStepProps extends Omit<StepProps, 'step'> {
|
|
|
25
25
|
valueOverwrite?: (value: any | null) => any;
|
|
26
26
|
/** Function called on each value change */
|
|
27
27
|
changeListener?: (value: any) => void;
|
|
28
|
+
/** default Value to select */
|
|
29
|
+
defaultValue?: any;
|
|
28
30
|
}
|
|
29
31
|
declare function SmartSelectStep(props: SmartSelectStepProps): JSX.Element;
|
|
30
32
|
export default SmartSelectStep;
|
package/package.json
CHANGED