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/build/components/table/index.js +27 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +2 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/table/index.ts +29 -1
- package/src/components/table/types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -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
|
-
//
|
|
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); }
|