gd-bs 6.6.83 → 6.6.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.83",
3
+ "version": "6.6.85",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -198,7 +198,10 @@ class _ListBox extends Base<IListBoxProps> implements IListBox {
198
198
  */
199
199
 
200
200
  // Gets the selected items
201
- getValue() { return this._selectedItems; }
201
+ getValue() {
202
+ // Return the value
203
+ return this.props.multi ? this._selectedItems : this._selectedItems[0];
204
+ }
202
205
 
203
206
  // Sets the options
204
207
  setOptions(items: Array<IDropdownItem> = []) {
@@ -81,7 +81,7 @@ export interface IListBox extends IBase<IListBoxProps> {
81
81
  el: HTMLElement;
82
82
 
83
83
  /** The selected listbox items. */
84
- getValue: () => Array<IDropdownItem>;
84
+ getValue: () => IDropdownItem | Array<IDropdownItem>;
85
85
 
86
86
  /** Sets the options */
87
87
  setOptions: (items: Array<IDropdownItem>) => void;
@@ -31,18 +31,20 @@ class _Table extends Base<ITableProps> implements ITable {
31
31
 
32
32
  // Parse the columns
33
33
  for (let i = 0; i < this.props.columns.length; i++) {
34
+ let colProp = this.props.columns[i];
35
+
34
36
  // Append the column
35
37
  let column = document.createElement("th");
36
38
  row.appendChild(column);
37
39
 
38
40
  // See if the footer exists
39
- if (this.props.columns[i].footer) {
41
+ if (colProp.footer || colProp.onRenderFooter) {
40
42
  // Set the flag
41
43
  hasFooter = true;
42
44
  }
43
45
 
44
46
  // Render the column
45
- this.renderColumn(column, this.props.columns[i]);
47
+ this.renderColumn(column, colProp);
46
48
  }
47
49
 
48
50
  // See if there is an event
@@ -72,12 +74,6 @@ class _Table extends Base<ITableProps> implements ITable {
72
74
  let column = document.createElement("td");
73
75
  row.appendChild(column);
74
76
 
75
- // See if the footer exists
76
- if (this.props.columns[i].footer) {
77
- // Set the flag
78
- hasFooter = true;
79
- }
80
-
81
77
  // Render the column
82
78
  this.renderColumnFooter(column, this.props.columns[i]);
83
79
  }
@@ -151,6 +147,8 @@ class _Table extends Base<ITableProps> implements ITable {
151
147
 
152
148
  // Renders a column footer
153
149
  private renderColumnFooter(column: HTMLTableCellElement, props: ITableColumn) {
150
+ column.innerHTML = props.footer || "";
151
+
154
152
  // See if there is an event for this column
155
153
  if (props.onRenderFooter) {
156
154
  // Call the event