patentiop.blogg.se

Table disappears on resize
Table disappears on resize







table disappears on resize

The columns will scale (growing or shrinking) to fit the available width. const gridOptions = Size Columns to FitĬall the Grid Api api.sizeColumnsToFit(params) to make the currently visible columns fit the screen. The snippet below allows all columns except Address to be resized by explicitly setting each column. To set resizing for each column, set resizable=true on the default column definition. Turn column resizing on for the grid by setting resizable=true for each column. I hot fixed it by adding an arbitrary width to the flexbox (for example width:1px, which gets overridden by the flexbox attributes) and the flexbox shrank accordingly, which let the datatable recalculate its available space accordingly.All columns can be resized by dragging the top right portion of the column.

table disappears on resize

1200px) and table wrapper recalculates its available space to 1200px, but as I decreased the window size, the flexbox kept its larger width (to wrap the table wrapper) and therefore it didnt forced the shrink on the datatable.

table disappears on resize

But the flexbox wraps its content and therefore always includes its child elements (the tablewrapper)Īs soon as I increased the window size, the flexbox grew (100% windowsize, i.e. The ngx-datatable calculates a fixed width based on the available space of the parent element (i.e 100% of flexbox, lets say 1000px wide window) and applies an width attribute to the tablewrapper (width:1000px). Not sure if its relevant, but my problem was the fixed child width of the datatable. I had a similar issue, but in conjunction with flexbox and the datatable scrollbars. What is the motivation / use case for changing the behavior?īrowser: I'll try to get a plunker up but it's entirely possible that there something else causing this that is specific to my app. It would re-render the width for enlarging and shrinking window. When rendering the datatable in a view and not absolutely positioned, the initial width is set and making the window larger triggers a resize, but shrinking it does not. support request => Please do not submit support request here, post on Stackoverflow or Gitter Bug report => search github for a similar issue or PR before submitting









Table disappears on resize