0

i have problem with horizontal scrollable div in ngx-datatable. How to fill content with full width ? That green color must be fill the content.

enter image description here

Here is some code:

@media screen and (min-width: 769px) and (max-width: 1160px) {
    .datatable-body {
      display: flex;
      flex-wrap: wrap;
      overflow-x: scroll;
      &-cell {
        flex: 0 0 20%;
        max-width: 20%;
        width: auto !important;
        min-width: 20% !important;
        white-space: normal !important;
        font-size: 12px;
        &.is_hidden {
          display: none;
        }
      }
    }

    .datatable-scroll,
    .datatable-row-wrapper,
    .datatable-body-row,
    .datatable-header-inner {
      width: 100% !important;
    }

    // All column will same width
    .datatable-header {
      &-cell {
        flex: 0 0 20%;
        max-width: 20%;
        width: auto !important;
        min-width: 20% !important;
        font-size: 12px;
        &.should_be_hidden {
          display: none;
        }
      }
    }
  }

What did i do wrong any suggestion ?

batgerel.e
  • 837
  • 1
  • 10
  • 31

1 Answers1

0

Try adding width to <ngx-datatable></ngx-datatable> selector.