sky
12/15/2024, 12:43 PMLuuk Peters (ProudNerds)
12/16/2024, 9:18 AMsky
12/16/2024, 9:27 AMleekelleher
12/16/2024, 11:35 AMUMB_PROPERTY_DATASET_CONTEXT
to observe the value of another property (within the same dataset).
You'll want to do this on the target property-editor, e.g. whatever is going to listen out for the source property-editor value changes.
this.consumeContext(UMB_PROPERTY_DATASET_CONTEXT, async (dataset) => {
this.observe(await dataset.propertyValueByAlias('theme'), (value) => {
// do something with the `value`
});
});
Here's an example of how the core's own Color Picker configuration uses it (for the "Show label" field).
https://github.com/umbraco/Umbraco-CMS/blob/release-15.1.1/src/Umbraco.Web.UI.Client/src/packages/core/components/multiple-color-picker-input/multiple-color-picker-input.element.ts#L94-L103Luuk Peters (ProudNerds)
12/16/2024, 12:21 PMsky
12/17/2024, 5:37 PM