gd-bs 6.6.4 → 6.6.6
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/build/components/dropdown/index.js +9 -3
- package/build/components/form/control.js +4 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +9 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/dropdown/index.ts +7 -2
- package/src/components/dropdown/types.d.ts +7 -1
- package/src/components/form/control.ts +4 -0
- package/src/components/form/controlTypes.d.ts +2 -0
|
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.Dropdown = exports.DropdownTypes = void 0;
|
|
18
|
+
exports.Dropdown = exports.DropdownTypes = exports.DropdownPlacements = void 0;
|
|
19
19
|
var base_1 = require("../base");
|
|
20
20
|
var button_1 = require("../button");
|
|
21
21
|
var checkboxGroup_1 = require("../checkboxGroup");
|
|
@@ -26,6 +26,7 @@ var templates_1 = require("./templates");
|
|
|
26
26
|
/**
|
|
27
27
|
* Dropdown Types
|
|
28
28
|
*/
|
|
29
|
+
exports.DropdownPlacements = popover_1.PopoverPlacements;
|
|
29
30
|
exports.DropdownTypes = button_1.ButtonTypes;
|
|
30
31
|
// Gets the template
|
|
31
32
|
var GetHTML = function (props) {
|
|
@@ -268,7 +269,7 @@ var _Dropdown = /** @class */ (function (_super) {
|
|
|
268
269
|
// Create the props
|
|
269
270
|
var props = {
|
|
270
271
|
target: toggle,
|
|
271
|
-
placement: popover_1.PopoverPlacements.BottomStart,
|
|
272
|
+
placement: typeof (this.props.placement) === "number" ? this.props.placement : popover_1.PopoverPlacements.BottomStart,
|
|
272
273
|
type: popoverType,
|
|
273
274
|
options: {
|
|
274
275
|
arrow: false,
|
|
@@ -378,6 +379,7 @@ var _Dropdown = /** @class */ (function (_super) {
|
|
|
378
379
|
};
|
|
379
380
|
// Renders the items
|
|
380
381
|
_Dropdown.prototype.renderItems = function () {
|
|
382
|
+
var _this = this;
|
|
381
383
|
// Clear the items
|
|
382
384
|
this._items = [];
|
|
383
385
|
// Get the menu
|
|
@@ -405,7 +407,11 @@ var _Dropdown = /** @class */ (function (_super) {
|
|
|
405
407
|
className: "m-2",
|
|
406
408
|
el: menu,
|
|
407
409
|
items: cbItems,
|
|
408
|
-
multi: this.props.multi
|
|
410
|
+
multi: this.props.multi,
|
|
411
|
+
onChange: this.props.onChange ? function (values, ev) {
|
|
412
|
+
// Pass the current values
|
|
413
|
+
_this.props.onChange(_this.getValue(), ev);
|
|
414
|
+
} : null
|
|
409
415
|
});
|
|
410
416
|
}
|
|
411
417
|
else {
|
|
@@ -182,6 +182,7 @@ var FormControl = /** @class */ (function () {
|
|
|
182
182
|
label: this.props.placeholder,
|
|
183
183
|
onChange: this._props.onChange,
|
|
184
184
|
onMenuRendering: this._props.onMenuRendering,
|
|
185
|
+
placement: this._props.placement,
|
|
185
186
|
required: this._props.required,
|
|
186
187
|
title: this._props.title,
|
|
187
188
|
value: value
|
|
@@ -200,6 +201,7 @@ var FormControl = /** @class */ (function () {
|
|
|
200
201
|
label: this.props.placeholder,
|
|
201
202
|
onChange: this._props.onChange,
|
|
202
203
|
onMenuRendering: this._props.onMenuRendering,
|
|
204
|
+
placement: this._props.placement,
|
|
203
205
|
required: this._props.required,
|
|
204
206
|
title: this._props.title,
|
|
205
207
|
value: value
|
|
@@ -304,6 +306,7 @@ var FormControl = /** @class */ (function () {
|
|
|
304
306
|
multi: true,
|
|
305
307
|
onChange: this._props.onChange,
|
|
306
308
|
onMenuRendering: this._props.onMenuRendering,
|
|
309
|
+
placement: this._props.placement,
|
|
307
310
|
required: this._props.required,
|
|
308
311
|
title: this._props.title,
|
|
309
312
|
value: value
|
|
@@ -323,6 +326,7 @@ var FormControl = /** @class */ (function () {
|
|
|
323
326
|
multi: true,
|
|
324
327
|
onChange: this._props.onChange,
|
|
325
328
|
onMenuRendering: this._props.onMenuRendering,
|
|
329
|
+
placement: this._props.placement,
|
|
326
330
|
required: this._props.required,
|
|
327
331
|
title: this._props.title,
|
|
328
332
|
value: value
|