Module: addon/components/sl-grid

Extends

  • ember/Component

Members

(inner) actions :Object

Type:
  • Object
Source:

(inner) actionsButtonLabel :String

The text label for the rows' actions buttons

Type:
  • String
Default Value:
  • 'Actions'
Source:

(inner, nullable) activeRecord :Object

The row record that is currently active in the detail pane

Type:
  • Object
Default Value:
  • null
Source:

(inner) classNameBindings :Array.<String>

Type:
  • Array.<String>
Source:

(inner) classNames :Array.<String>

Type:
  • Array.<String>
Source:

(inner) columns :Array.<ColumnDefinition>

Type:
  • Array.<ColumnDefinition>
Source:

(inner, nullable) content :Array.<Object>

Type:
  • Array.<Object>
Default Value:
  • null
Source:

(inner) continuous :Boolean

Whether the grid's data should be handled by continuous-scrolling

When this is false (default), then the grid will have pagination enabled.

Type:
  • Boolean
Default Value:
  • false
Source:

(inner) currentPage :Number

The current page, valid for a non-continuous grid

Type:
  • Number
Default Value:
  • 1
Source:

(inner, nullable) detailComponent :String

The name of the component to render for the detail pane

Type:
  • String
Default Value:
  • null
Source:

(inner, nullable) detailFooterPath :String

The path of a template to use for the detail-pane footer

Type:
  • String
Default Value:
  • null
Source:

(inner, nullable) detailHeaderPath :String

The path of a template to use for the detail-pane header

Type:
  • String
Default Value:
  • null
Source:

(inner) detailPaneOpen :Boolean

Indicates when the detail-pane is open

Type:
  • Boolean
Default Value:
  • false
Source:

(inner) filterButtonLabel :String

The text to display on the filter panel toggle button

Type:
  • String
Default Value:
  • 'Filter'
Source:

(inner, nullable) filterComponent :String

The name of a component to use for the filter panel

Type:
  • String
Default Value:
  • null
Source:

(inner) filterPaneOpen :Boolean

Indicates when the filter pane is open

Type:
  • Boolean
Default Value:
  • false
Source:

(inner, nullable) footerPath :String

The path for the template to use for the footer of the list pane

Type:
  • String
Default Value:
  • null
Source:

(inner) height :Number|String

The height of the overall grid

When the value is set to "auto" (the default), then the sl-grid will size its content to take up the maximum valid vertical space for the current viewport.

Type:
  • Number | String
Default Value:
  • 'auto'
Source:

(inner) layout :Object

Type:
  • Object
Source:

(inner) loading :Boolean

When true, the split-grid is in a loading state

Type:
  • Boolean
Default Value:
  • false
Source:

(inner) nextPageScrollPoint :Number

The "top" value for the table scroll to request a new page at

Type:
  • Number
Default Value:
  • 0
Source:

(inner) pageSize :Number

The number of records to request for each page

Type:
  • Number
Default Value:
  • 25
Source:

(inner) rowActionContext :module:components/sl-grid~_parentView._controller

The aliased grid's parent controller, used to trigger row actions

Type:
  • module:components/sl-grid~_parentView._controller
Source:

(inner, nullable) rowActions :Array.<Object>

An array of action definitions to use for individual row actions

Each item in this array should have the following properties:

  • {String} action - The name of the action to trigger when this option is called
  • {String} label - The displayed text for the option
Type:
  • Array.<Object>
Default Value:
  • null
Source:

(inner, nullable) rowClick :String

Bound action to call when a row is clicked

When this value is not set, the detail pane will be opened whenever a row is clicked.

Type:
  • String
Default Value:
  • null
Source:

(inner) sortAscending :Boolean

Whether the currently sorted column is ascending or not

Type:
  • Boolean
Default Value:
  • true
Source:

(inner, nullable) sortedColumnTitle :Object

The title of the column that is currently being sorted

Type:
  • Object
Default Value:
  • null
Source:

(inner) tagName :String

Type:
  • String
Default Value:
  • 'div'
Source:

Methods

(inner) actions:changePage(page) → {undefined}

Handle changing pages

Parameters:
Name Type Description
page Number

The page number being changed to

Source:
Returns:
Type
undefined

(inner) actions:rowClick(row) → {undefined}

Handle a list item's row click

If an action is bound to the rowClick property, then it will be called when this is triggered. Otherwise, the detail-pane will be opened for the triggering row's model record, unless no detailPath is defined.

Parameters:
Name Type Description
row Object

The object that the clicked row represents

Source:
Returns:
Type
undefined

(inner) actions:sortColumn(column) → {undefined}

Toggle sorting of the selected column, and send the "sortAction" bound action the column and direction to sort

Parameters:
Name Type Description
column Object

The column definition for the triggered header's column

Source:
Returns:
Type
undefined

(inner) actions:toggleFilterPane() → {undefined}

Opens/closes the filter pane

Source:
Returns:
Type
undefined

(inner) disableContinuousPaging() → {undefined}

Disables the scroll event handling for continuous paging

Source:
Returns:
Type
undefined

(inner) enableContinuousPaging() → {undefined}

Enables the scroll event handling for continuous paging

Source:
Returns:
Type
undefined

(inner) handleListContentScroll(event) → {undefined}

For continuous grids; callback to the list content scrolling, which is responsible for determining when triggering requestData is necessary by checking the scroll location of the content

Parameters:
Name Type Description
event jQuery.Event

The scroll trigger event

Source:
Returns:
Type
undefined

(inner) handleNewContent() → {undefined}

Does cleanup for internal state when content length has changed

Source:
Observes:
  • content.@each
Returns:
Type
undefined

(inner) hasMoreData() → {Boolean}

Whether the content has more available data to page in

Source:
Observes:
  • content.length, totalCount
Returns:
  • True if more content pages are available
Type
Boolean

(inner) requestMoreData() → {undefined}

Trigger the bound requestData action for more content data

Source:
Returns:
Type
undefined

(inner) setupAutoHeight() → {undefined}

Setup the viewport-based auto sizing when height is "auto"

Source:
Listens to Events:
  • event:didInsertElement
Returns:
Type
undefined

(inner) setupContinuousPaging() → {undefined}

Setup the "continuous paging" functionality, if the data set is not complete

Source:
Listens to Events:
  • event:didInsertElement
Returns:
Type
undefined

(inner) setupTemplates() → {undefined}

Setup paths for the various sections within the split-grid

Source:
Listens to Events:
  • event:init
Returns:
Type
undefined

(inner) showPagination() → {Boolean}

Whether to show the pagination in the list-pane footer

Source:
Observes:
  • continuous, totalPages
Returns:
Type
Boolean

(inner) sortedColumn() → (nullable) {Object}

The currently sorted column definition

Source:
Observes:
  • columns, sortedColumnTitle
Returns:

The definition for the currently sorted column

Type
Object

(inner) totalPages() → {Number|undefined}

The total number of pages of bound content, based on pageSize

Source:
Observes:
  • continuous, pageSize, totalCount
Returns:
Type
Number | undefined

(inner) updateHeight() → {undefined}

Update the panes' heights according to height property value

Source:
Listens to Events:
  • event:didInsertElement
Returns:
Type
undefined

Type Definitions

ColumnDefinition

Type:
  • Object
Properties:
Name Type Attributes Description
align ColumnAlign <optional>

Which direction to align the column's content

primary Boolean <optional>

Whether the column is always shown

size Number | ColumnSize <optional>

The width of the column; either a number of pixels, or a ColumnSize value

sortable Boolean <optional>

Whether the column is able to be sorted

template String <optional>

Template name to use for the cell value; uses the rowController as its controller

title String

The displayed title of the column

valuePath String <optional>

Name of a property to lookup on the rows to populate the cell with

Source: