Umbraco 14 - Umbraco UI: How to build a custom property extension with pickers?
Hi, have anyone tried building extensions with the new Umbraco UI?
I'm trying out the new UI lib, lit etc and playing around with a demo, and I would like to try to add some pickers for media and multi-node content picking.
Does anyone have any examples, or maybe some hints on what I should look into? I'm guessing I have to dispatch some sort of event, and listen to the returned values.
Umbraco 14 - Umbraco UI: How to build a custom property extension with pickers?
Hi, have anyone tried building extensions with the new Umbraco UI?
I'm trying out the new UI lib, lit etc and playing around with a demo, and I would like to try to add some pickers for media and multi-node content picking.
Does anyone have any examples, or maybe some hints on what I should look into? I'm guessing I have to dispatch some sort of event, and listen to the returned values.
Thanks!
Hey sean,
for media:
import type { UmbInputMediaElement } from '@umbraco-cms/backoffice/media';
property as: media: string = "";
event handler:
#onChange(event: CustomEvent & { target: UmbInputMediaElement }) { this.media = event.target.selection?.join(',') ?? null; this.dispatchEvent(new UmbPropertyValueChangeEvent()); }
i would look at this setup from core as well property-editor-ui-media-entity-picker.element.ts Latest
, i use it like this to send the data to server from which i save it to my db
is working on a reply...