# All files / src/app/shared/models cd-table-fetch-data-context.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    1890x
    75x

    75x

    90x
     export class CdTableFetchDataContext {
      errorConfig = {
        resetData: true, // Force data table to show no data
        displayError: true // Show an error panel above the data table
      };

      /**
       * The function that should be called from within the error handler
       * of the 'fetchData' function to display the error panel and to
       * reset the data table to the correct state.
       */
      error: Function;

      constructor(error: () => void) {
        this.error = error;
      }
    }