Another nice one.. I have a content picker umb-input-content when I want the selected item I need to do this in typescript because the UmbInputContentElement can't be referenced?
#onChange(event: InputEvent) {
if (event.target && event.target instanceof HTMLElement) {
const target = event.target;
const firstShadowRoot = target.shadowRoot;
if (firstShadowRoot) {
const umbInputDocument = firstShadowRoot.querySelector('umb-input-document');
if (umbInputDocument && umbInputDocument.shadowRoot) {
const refList = umbInputDocument.shadowRoot.querySelector('uui-ref-list');
if (refList) {
const id = refList.id; // Access the id of the uui-ref-list
console.log(id); // Use the id as needed
}
}
}
}
}