You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Ribbon column is treated like any other column, you can also assign a custom PCF to it. This allows you to create unique Ribbon buttons that align with your specific requirements. You can either create a fuly custom UI or leverage the `GridInlineRibbon` Base Control to build upon the existing Ribbon UI.
When the PCF is rendered as cell control, it will always receive these **bindings** in PCF context:
@@ -175,6 +255,7 @@ When the PCF is rendered as cell control, it will always receive these **binding
175
255
|`IsInlineNewEnabled`| Whether new records can be created from the control. (Lookup only) |
176
256
|`EnableTypeSuffix`| Whether the data type related suffix should be displayed, such as an icon for a Phone field. |
177
257
|`EnableOptionSetColors`| Whether the control should display option set value colors (OptionSet only) |
258
+
|`ShouldUnmountWhenOutputChanges`| Whether the control will unmount once a value is outputed |
178
259
179
260
The PCF will also receive `isControlDisabled` within `context.mode`. It's value depends on the control's role:
180
261
@@ -219,39 +300,6 @@ When using a PCF control as a cell renderer, ensuring a fast render cycle is cri
219
300
220
301
To improve performance and speed up development, you can leverage the native cell renderer in your custom PCF. You can access it via the `GridCellRenderer` Base Control. It’s designed with performance in mind and you can simply customize it through the `onOverrideComponentProps` prop.
<buttononClick={() => alert(`Hello from ${formattedValue}!`)}>
242
-
{formattedValue}
243
-
</button>
244
-
),
245
-
},
246
-
};
247
-
}}
248
-
/>
249
-
);
250
-
};
251
-
```
252
-
*The code snippet above utilizes the native cell renderer but replaces its content with a custom button. Since the button is embedded within the native renderer, it inherits all the styling applied at higher layers, such as padding and alignment.*
> **_NOTE:_** The same concept applies to cell editors. Each native editor is managed through a Base Control, which you can utilize and tailor within your editor PCF. For instance, `talxis_TALXIS.PCF.ColorPicker` leverages the `TextField` Base Control and customizes it to suit it's needs.
0 commit comments