tabler-react-2 0.1.136 → 0.1.138
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
|
@@ -7,7 +7,8 @@ exports.DropdownInput = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _index = require("../index");
|
|
10
|
-
var
|
|
10
|
+
var _util = require("../util");
|
|
11
|
+
var _excluded = ["prompt", "values", "items", "value", "onChange", "aprops", "showSearch", "loading", "disabled", "disabledText", "label", "showLabel", "color", "outline", "maxHeight", "required", "autofocusSearch"];
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -43,6 +44,8 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
43
44
|
_ref$maxHeight = _ref.maxHeight,
|
|
44
45
|
maxHeight = _ref$maxHeight === void 0 ? "300px" : _ref$maxHeight,
|
|
45
46
|
required = _ref.required,
|
|
47
|
+
_ref$autofocusSearch = _ref.autofocusSearch,
|
|
48
|
+
autofocusSearch = _ref$autofocusSearch === void 0 ? false : _ref$autofocusSearch,
|
|
46
49
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
47
50
|
var values = ivalues || items || [];
|
|
48
51
|
var getLabelText = function getLabelText(val) {
|
|
@@ -116,7 +119,9 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
116
119
|
href: "javascript:void(0)",
|
|
117
120
|
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || ""),
|
|
118
121
|
"data-bs-toggle": "dropdown"
|
|
119
|
-
}, aprops),
|
|
122
|
+
}, aprops), /*#__PURE__*/_react["default"].createElement(_util.Row, {
|
|
123
|
+
gap: 0.5
|
|
124
|
+
}, selectedValue && props.showIconInPrompt ? selectedValue.icon : null, selectedValue ? selectedValue.label : prompt)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
125
|
className: "dropdown-menu"
|
|
121
126
|
}, showSearch && /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
127
|
className: "px-2 py-1"
|
|
@@ -125,6 +130,9 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
125
130
|
value: searchQuery,
|
|
126
131
|
onChange: function onChange(q) {
|
|
127
132
|
return setSearchQuery(q);
|
|
133
|
+
},
|
|
134
|
+
inputProps: {
|
|
135
|
+
autoFocus: autofocusSearch
|
|
128
136
|
}
|
|
129
137
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
138
|
style: {
|