gd-bs 6.9.13 → 6.9.14

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.9.13",
3
+ "version": "6.9.14",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -174,7 +174,7 @@ class _Table extends Base<ITableProps> implements ITable {
174
174
 
175
175
  // Renders a row
176
176
  private renderRow(row: HTMLTableRowElement, data, rowIdx: number) {
177
- // See if columns
177
+ // Parse the columns
178
178
  for (let i = 0; i < this.props.columns.length; i++) {
179
179
  // Create the cell
180
180
  this.renderCell(row, this.props.columns[i], data, rowIdx);
@@ -206,5 +206,33 @@ class _Table extends Base<ITableProps> implements ITable {
206
206
  }
207
207
  }
208
208
  }
209
+
210
+ // Method to update a row element
211
+ updateRow(elRow: HTMLElement, row: any = {}) {
212
+ // Parse the columns
213
+ for (let i = 0; i < this.props.columns.length; i++) {
214
+ let colProps = this.props.columns[i];
215
+ let elCol = elRow.children[i] as HTMLTableCellElement;
216
+ if (elCol) {
217
+ // See if there is an event for this column
218
+ if (colProps.onRenderCell) {
219
+ // Call the event
220
+ colProps.onRenderCell(elCol, colProps, row);
221
+ }
222
+
223
+ // See if there is an event for this component
224
+ if (this.props.onRenderCell) {
225
+ // Call the event
226
+ this.props.onRenderCell(elCol, colProps, row);
227
+ }
228
+ }
229
+ }
230
+
231
+ // See if there is an event
232
+ if (this.props.onRenderRow) {
233
+ // Call the event
234
+ this.props.onRenderRow(elRow as HTMLTableRowElement, row);
235
+ }
236
+ }
209
237
  }
210
238
  export const Table = (props: ITableProps, template?: string): ITable => { return new _Table(props, template); }
@@ -78,6 +78,8 @@ export interface ITable {
78
78
 
79
79
  /** Shows the table. */
80
80
  show: () => void;
81
+
82
+ updateRow: (elRow: HTMLElement, row: any) => void;
81
83
  }
82
84
 
83
85
  /**