The RoleBrowser component allows users to search, browse, and select roles from a predefined role management system. It is commonly used in enterprise applications for assigning permissions, managing user access, and configuring role-based security.
1. Basic Properties
- Name: Unique identifier for the component (e.g.,
RoleBrowser1
). - Label: Text displayed above the input (e.g.,
Select role
). - Default value: Predefined role selected by default.
- Placeholder: Hint text shown when no role is selected.
States
- Multiple: Enables selecting multiple roles at once.
- Disabled: Prevents interaction.
- Hidden: Hides the component while keeping it logically active.
- Auto focus: Automatically focuses on the input field when the page loads.
- Multiline: Displays selected roles in multiple lines if needed.
2. Layout
Defines the responsive behavior (grid placement, spacing).
π See Common Properties β Layout.
3. Events
- onChange β Triggered when the selected role(s) change.
4. Loading
- Loading: Shows a spinner or indicator while roles are being fetched.
5. User Interaction
- The component provides a search button (π) to quickly filter roles.
- Selected roles are displayed in the field with options to clear (β) or open search dialog (π).
- Clicking the search dialog opens a Role Browser modal with a result list.
Role Browser Modal Features
- Role Name: Displays the roleβs name (e.g., Manager, Moderator, Supporter, Admin).
- Default: Indicates whether a role is set as the system default.
- Is Public: Marks whether a role is public and available to all users.
- Pagination: Supports paging (e.g., 10, 20, 40 roles per page).
6. Business Use Cases
The RoleBrowser is designed for:
- Assigning user roles in an application.
- Managing access control in multi-user environments.
- Linking workflows or approvals to specific roles.
- Security and authorization settings in enterprise systems.
7. Style
Custom styles can be applied to align with application branding.
π See Common Properties β Style.
β The RoleBrowser component is essential for enterprise-grade applications that use role-based access control (RBAC). It provides a structured way to select and assign roles with support for searching, multi-select, and property-based filtering.