summaryrefslogtreecommitdiffstats
path: root/grid/src/grid.ts
diff options
context:
space:
mode:
Diffstat (limited to 'grid/src/grid.ts')
-rw-r--r--grid/src/grid.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/grid/src/grid.ts b/grid/src/grid.ts
index f263ac7..374f6ca 100644
--- a/grid/src/grid.ts
+++ b/grid/src/grid.ts
@@ -7,7 +7,7 @@ interface GridProps {
columns: Array<GridColumn>;
pageSize?: number;
search?: SearchConfiguration;
- tableClassName?: string
+ tableClassName?: string;
}
interface GridConfiguration {
@@ -17,7 +17,7 @@ interface GridConfiguration {
columns: Array<GridColumn>;
pageSize: number;
search: SearchConfiguration;
- tableClassName: string
+ tableClassName: string;
}
interface SearchConfiguration {
@@ -136,12 +136,15 @@ export default class Grid {
}
private renderWrapper(): void {
- const wrapper = document.createElement("table");
+ const wrapper = document.createElement("div");
+ wrapper.className = "table-responsive";
+ const table = document.createElement("table");
const thead = document.createElement("thead");
const tbody = document.createElement("tbody");
- wrapper.className = this.configuration.tableClassName;
- wrapper.appendChild(thead);
- wrapper.appendChild(tbody);
+ table.className = this.configuration.tableClassName;
+ table.appendChild(thead);
+ table.appendChild(tbody);
+ wrapper.appendChild(table);
this.domElement.appendChild(wrapper);
}