Skip to content

Commit 4e8dfa4

Browse files
authored
Merge pull request #2235 from yinglejia/table-content-2
fix(table): enable horizontal scroll in table
2 parents ee6b3e0 + bfb13df commit 4e8dfa4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/table/table.component.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,12 @@ import { TableRowSize } from "./table.types";
241241
</tr>
242242
</tfoot>
243243
</table>
244-
`
244+
`,
245+
styles: [`
246+
:host {
247+
display: block;
248+
}
249+
`]
245250
})
246251
export class Table implements AfterViewInit, OnDestroy {
247252
/**
@@ -451,6 +456,11 @@ export class Table implements AfterViewInit, OnDestroy {
451456
*/
452457
@Input() striped = true;
453458

459+
/**
460+
* Allows table content to scroll horizontally
461+
*/
462+
@HostBinding("class.bx--data-table-content") tableContent = true;
463+
454464
/**
455465
* Set to `true` to stick the header to the top of the table
456466
*/

0 commit comments

Comments
 (0)