@gpa-gemstone/react-forms 1.1.102 → 1.1.103
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/lib/MultiInput.js +3 -3
- package/package.json +1 -1
package/lib/MultiInput.js
CHANGED
|
@@ -75,7 +75,7 @@ function MultiInput(props) {
|
|
|
75
75
|
: null,
|
|
76
76
|
fieldArray.map(function (r, index) {
|
|
77
77
|
var _a, _b, _c, _d, _e, _f;
|
|
78
|
-
return (React.createElement("div", { className: 'row', key: index },
|
|
78
|
+
return (React.createElement("div", { className: 'row no-gutters', key: index },
|
|
79
79
|
React.createElement("div", { className: 'col-10' },
|
|
80
80
|
React.createElement(Input_1.default, { Record: fieldArray, Field: index, Label: index === 0 ? props.Label : '', AllowNull: props.AllowNull, Type: props.Type, Help: index === 0 ? props.Help : undefined, Feedback: (_b = (_a = props.ItemFeedback) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : undefined, Valid: function () { var _a, _b; return (_b = (_a = props.ItemValid) === null || _a === void 0 ? void 0 : _a.call(props, r, index, fieldArray)) !== null && _b !== void 0 ? _b : true; }, Style: props.Style, Disabled: props.Disabled, Setter: function (record) {
|
|
81
81
|
var _a;
|
|
@@ -87,7 +87,7 @@ function MultiInput(props) {
|
|
|
87
87
|
newArray[index] = record[index];
|
|
88
88
|
props.Setter(__assign(__assign({}, props.Record), (_a = {}, _a[props.Field] = newArray, _a)));
|
|
89
89
|
} })),
|
|
90
|
-
React.createElement("div", { className: "col-".concat(index === __spreadArray([], fieldArray, true).length - 1 ? 1 : 2, " ").concat(index === 0 ? 'd-flex align-items-center' : '') },
|
|
90
|
+
React.createElement("div", { className: "col-".concat(index === __spreadArray([], fieldArray, true).length - 1 ? 1 : 2, " ").concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
91
91
|
React.createElement("button", { className: 'btn', style: ((_c = props.Disabled) !== null && _c !== void 0 ? _c : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
92
92
|
var _a;
|
|
93
93
|
var newRecords = __spreadArray([], fieldArray, true).filter(function (_, i) { return i !== index; });
|
|
@@ -95,7 +95,7 @@ function MultiInput(props) {
|
|
|
95
95
|
} },
|
|
96
96
|
React.createElement(gpa_symbols_1.ReactIcons.TrashCan, { Color: 'red' }))),
|
|
97
97
|
index === __spreadArray([], fieldArray, true).length - 1 ?
|
|
98
|
-
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center' : '') },
|
|
98
|
+
React.createElement("div", { className: "col-1 ".concat(index === 0 ? 'd-flex align-items-center justify-content-center' : '') },
|
|
99
99
|
React.createElement("button", { className: 'btn', style: ((_f = (((_d = props.DisableAdd) !== null && _d !== void 0 ? _d : false) || ((_e = props.Disabled) !== null && _e !== void 0 ? _e : false))) !== null && _f !== void 0 ? _f : false) ? { display: 'none' } : undefined, onClick: function () {
|
|
100
100
|
var _a;
|
|
101
101
|
var newRecords = __spreadArray(__spreadArray([], __spreadArray([], fieldArray, true), true), [props.DefaultValue], false);
|