grid interface is what user have access to controll grid behavior

Type Parameters

  • T

Constructors

Properties

cellAppendClassSetterFn: ((attribute, rowData, cellReadOnlyConfig) => {
    dimmedClass: string;
    inputClass: string;
})

for adding classes on row lvl

Type declaration

    • (attribute, rowData, cellReadOnlyConfig): {
          dimmedClass: string;
          inputClass: string;
      }
    • for adding classes on row lvl

      Parameters

      • attribute: string
      • rowData: Entity
      • cellReadOnlyConfig: boolean

      Returns {
          dimmedClass: string;
          inputClass: string;
      }

      • dimmedClass: string
      • inputClass: string
columnsSelected: Set<number>
dataSource: Datasource<T>
grid: Grid
gridConfig: GridConfig
initConfig: GridConfig
listeners: Set<callable> = ...

subscribed listerners, gets called when collection changes/is sorted/filtered etc

readonlySetterFn: ((attribute, rowData, cellReadOnlyConfig) => boolean)

for setting readonly based on row values

Type declaration

    • (attribute, rowData, cellReadOnlyConfig): boolean
    • for setting readonly based on row values

      Parameters

      • attribute: string
      • rowData: Entity
      • cellReadOnlyConfig: boolean

      Returns boolean

scrollHeight: number
scrollHeights: number[]
scrollTops: number[]
suppressEvents: boolean

for skipping events during setting gridconfig

Methods

  • Private Internal

    called by grid calss

    Parameters

    • attribute: string
    • rowData: Entity
    • cellReadOnlyConfig: boolean

    Returns {
        dimmedClass: string;
        inputClass: string;
    }

    • dimmedClass: string
    • inputClass: string
  • Private Internal

    called by grid calss

    Parameters

    • attribute: string
    • rowData: Entity
    • cellReadOnlyConfig: boolean

    Returns boolean

  • Private Internal

    used to call subscribers, used by selection/sorting/filter/grouping controller

    Parameters

    • event: string
    • data: {} = {}

      Returns void

    • Private Internal

      Returns void

    • Private Internal

      Returns void

    • Private Internal

      Returns GridConfig

    • Private Internal

      scroll state have all row height and top values this is used during a scroll event to move rows into right height

      Returns {
          scrollHeight: number;
          scrollHeights: number[];
          scrollTops: number[];
      }

      • scrollHeight: number
      • scrollHeights: number[]
      • scrollTops: number[]
    • Private Internal

      Parameters

      • number: number

      Returns boolean

    • Private Internal

      Returns boolean

    • Private Internal

      Returns void

    • Private Internal

      Returns number

    • Private Internal

      Parameters

      • number: number
      • add: boolean = false

      Returns void

    • adds event listener, useful when you need to do stuff based on

      Parameters

      Returns void

    • Returns void

    • this is for enabling class append to input element and dimmed cell behind it dimmed cell can be used for graphics in class

      Parameters

      • callback: ((attribute, rowData, cellReadOnlyConfig) => {
            dimmedClass: string;
            inputClass: string;
        })
          • (attribute, rowData, cellReadOnlyConfig): {
                dimmedClass: string;
                inputClass: string;
            }
          • Parameters

            • attribute: string
            • rowData: Entity
            • cellReadOnlyConfig: boolean

            Returns {
                dimmedClass: string;
                inputClass: string;
            }

            • dimmedClass: string
            • inputClass: string

      Returns void

    • do not use - used by grid to connect

      Parameters

      Returns void

    • small helper function to show context menu in same style as the rest

      Parameters

      • event: MouseEvent
      • options: {
            isHeader?: boolean;
            label: string;
            value: string;
        }[]
      • cell: HTMLElement
      • callback: ((attribute) => void)
          • (attribute): void
          • Parameters

            • attribute: string

            Returns void

      Returns void

    • gets columns in order by default it filters out selected columns only

      Parameters

      • filterSelectedColumns: boolean = true

        = true by default

      Returns string[]

    • contextMenu element can be used to attach own context menus practical since it will be removed if new is open/scroll happens

      Returns HTMLElement

    • current datasource

      Returns Datasource<T>

    • Returns string[]

    • Private Internal

      do not use - used to handle event from datasource cant use __ since datasource wants it without

      Parameters

      • e: any

      Returns boolean

    • when you need load grid config

      Parameters

      • gridConfig: GridConfig
      • skipRebuild: boolean = false

      Returns void

    • loads init config, useful when saved/loaded many different configs

      Returns void

    • Returns void

    • this is for enabling readonly based on row data

      Parameters

      • callback: ((attribute, rowData, cellReadOnlyConfig) => boolean)
          • (attribute, rowData, cellReadOnlyConfig): boolean
          • Parameters

            • attribute: string
            • rowData: Entity
            • cellReadOnlyConfig: boolean

            Returns boolean

      Returns void

    • contextMenu element can be used to attach own context menus practical since it will be removed if new is open/scroll happens

      Returns void

    • removes listener from datasource

      Parameters

      Returns void

    • when you need to save a copy

      Returns GridConfig

    • contextMenu element can be used to attach own context menus practical since it will be removed if new is open/scroll happens

      Parameters

      • el: HTMLElement

      Returns void

    • trigger rebuild of all

      Returns void

    • this will force scroll event and update cells usefull if you have done any manual edits to datasource data and want grid updated

      Returns void

    • in case you need to set new init config, to be used with loadInitConfig()

      Parameters

      • gridConfig: GridConfig
      • load: boolean = false

        = false, but can be usedful if you want to update and load it

      Returns void

    Generated using TypeDoc