Namespace

selection

kiss.selection

A simple selection manager

  • keeps track of selected records for a specific view
  • allow simple operations like add/delete/get/reset
  • store in a localStorage object, which key is the viewId
  • works in combination with datatables or other data components with selection capabilities

View Source client/core/modules/selection.js, line 13

Methods

# static delete(viewId, recordId)

Delete a record from the view selection

Parameters:
Name Type Description
viewId string
recordId string

View Source client/core/modules/selection.js, line 51

# static deleteSelectedRecords()

Delete the selected records

View Source client/core/modules/selection.js, line 386

# static get(viewId) → {Array.<string>}

Get the current selection for a view

Parameters:
Name Type Description
viewId string

View Source client/core/modules/selection.js, line 78

The list of ids of the selected records

Array.<string>

# static getFromActiveView(viewId) → {Array.<string>}

Get the current selection for the active view

Parameters:
Name Type Description
viewId string

View Source client/core/modules/selection.js, line 91

The list of ids of the selected records

Array.<string>

# static getRecords(viewId) → {Array.<object>}

Get the selected records in a view

Parameters:
Name Type Description
viewId string

View Source client/core/modules/selection.js, line 106

The list of selected records

Array.<object>

# static getRecordsFromActiveView() → {Array.<object>}

Get the selected records in the active view

View Source client/core/modules/selection.js, line 117

The list of selected records

Array.<object>

# static insertMany(viewId, recordIds)

Insert many records into the view selection

Parameters:
Name Type Description
viewId string
recordIds Array.<string>

View Source client/core/modules/selection.js, line 39

# static insertOne(viewId, recordId)

Insert one record into the view selection

Parameters:
Name Type Description
viewId string
recordId string

View Source client/core/modules/selection.js, line 20

# static reset(viewId)

Reset the selection of a view

Parameters:
Name Type Description
viewId string

View Source client/core/modules/selection.js, line 65

# static updateSelectedRecords()

Opens a window to batch update the selected records

View Source client/core/modules/selection.js, line 125