HomeGuidesRecipesAPI ExplorerForumSupport
Partner Portal
Partner Portal

UserRoleTable

The UserRoleTable component is a comprehensive React component that displays all user roles and their permission sets created by an entity.


📘

Permissions

To access this component, the entity user must have read permissions for the role object. For more information, see List of permissions.

Preview

`TagsTable` component preview.

UserRoleTable component preview.

Usage

Use the UserRoleTable component in your application as shown:

import { UserRoleTable } from "@monite/sdk-react"

// This component must be rendered within the MoniteProvider wrapper
const UserRoleTablePage = () => {
  return <UserRoleTable />;
};

Props

The following table shows all UserRoleTable component properties, their types, and descriptions:


PropTypeDescription
onFilterChangedfunctionThis callback is triggered when the filtering options are changed.
onRowClickfunctionThis callback takes the identifier of the clicked row as a parameter and is triggered when a user role table row is clicked.
onSortChangedfunctionThis callback is called when the current sorting order for any column is changed. It returns the newly sorted field and order.

The onSortChanged takes one argument whose value is an object with the following fields:

  • sort - the field name of the column whose sort order was changed. For example, created_at.
  • order - the new sort order, either asc or desc
(  
  "sort": "created_at",  
  "order": "asc" | "desc" | null  
) => void