tabler-react-2 0.1.142 → 0.1.144
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/dist/input/dropdown.js
CHANGED
|
@@ -117,7 +117,7 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
117
117
|
className: "dropdown"
|
|
118
118
|
}, props), /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
119
119
|
href: "javascript:void(0)",
|
|
120
|
-
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || ""),
|
|
120
|
+
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || "", " ").concat(props.invalid ? "is-invalid" : ""),
|
|
121
121
|
"data-bs-toggle": "dropdown"
|
|
122
122
|
}, aprops), /*#__PURE__*/_react["default"].createElement(_util.Row, {
|
|
123
123
|
gap: 0.5
|
|
@@ -156,7 +156,7 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
156
156
|
var isActive = (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.id) === v.id;
|
|
157
157
|
var isItemDisabled = v.disabled === true;
|
|
158
158
|
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
159
|
-
key: (_v$id = v.id) !== null && _v$id !== void 0 ? _v$id : i,
|
|
159
|
+
key: ((_v$id = v.id) !== null && _v$id !== void 0 ? _v$id : i) + "__" + i,
|
|
160
160
|
className: "dropdown-item".concat(isActive ? " active" : "").concat(isItemDisabled ? " disabled" : ""),
|
|
161
161
|
onClick: function onClick() {
|
|
162
162
|
return !isItemDisabled && handleSelection(v);
|