Skip to content

How to use the selectable rows feature? #1

Answered by sa-si-dev
sa-si-dev asked this question in Q&A
Discussion options

You must be logged in to vote

To enable the selectable rows feature, add the properties showSelectableCol and selectedRowsActions

class GridComponent extends GridCoreComponent {
  constructor(options) {
    let defaultOptions = {
      showSelectableCol: true,
      selectedRowsActions: [
        { label: 'Delete', value: 'delete' },
        { label: 'Change Status', value: 'change_status' },
      ],
      // selectedRowsActions: ['Delete', 'Change Status'], /** if label and value are same */
    };

    super(Object.assign(defaultOptions, options));
  }
}



Override isRowSelectable method to disable the checkbox for rows that don't have permission

isRowSelectable(rowData) {
  /** return boolean value */
  return rowData

Replies: 2 comments 3 replies

Comment options

sa-si-dev
May 29, 2021
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by sa-si-dev
Comment options

You must be logged in to vote
3 replies
@sa-si-dev
Comment options

sa-si-dev Oct 7, 2021
Maintainer Author

@eugenefoxx
Comment options

@sa-si-dev
Comment options

sa-si-dev Oct 8, 2021
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants