Overview The OptionsetControl is a PowerApps component framework (PCF) control designed to display and interact with an Option Set attribute in a model-driven app. The control renders option set values as buttons and allows users to select a value. Features Dynamically retrieves option set values from the OptionSetAttribute . Displays options as buttons with customizable colors. Allows toggling selection. Provides soft default colors when custom colors are not provided. Updates and maintains state based on user interaction and data context changes. Implementation Details 1. Initialization ( init Method) The init method initializes the control by: Assigning context and necessary parameters. Parsing color settings. Extracting the default or currently selected option set value. Creating and rendering buttons for each option set value. Attaching the main container to the provided container. 2. Parsing Colors ( parseColors Method) Parses the color mapping for each...
1. Overview The ContactsControl component is a custom PowerApps control that displays a searchable and sortable table of contact records. It provides an interactive UI for filtering and selecting records. 2. Functionalities Search Feature: Allows users to filter records by entering text. Sorting: Clickable column headers enable ascending/descending sorting. Record Selection: Users can select a record to trigger a modal alert. Dynamic Rendering: Updates view dynamically based on search and sort input. Custom Styling: Uses external CSS for styling. 3. Component Structure Main Container ( HTMLDivElement ) : Holds the search bar and table. Search Input ( HTMLInputElement ) : Enables real-time search. Table ( HTMLTableElement ) : Displays the records with sortable headers. Modal Alert ( HTMLDivElement ) : Displays selected record details. 4. Implementation Details 4.1 Initialization ( init Method) Sets up the main container. Loads external styles. Creates...