And in the media-tree-item.element.js I changed the elementName to avoid this error : "NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "umb-media-tree-item" has already been used with this registry"
This works, i'm getting my new ui elements that I define in media-tree-item.element.ts and getting my new properties that i fill in the media-tree.server.data-source.ts
Problem: Sometimes it works, and sometimes it doesn't. If I refresh the page, my code occasionally appears, but other times the default Umbraco behavior is displayed.
I always have this error in the console : "Umb.Repository.Media.Tree is already registered" that i can fix changing alias: 'Umb.Repository.Media.Tree', to alias: 'Umb.Repository.Media.Tree-V2' but in that case my code stops works.
Umbraco 14 Override Media Tree UI and Datasource
I want to customize the Media Tree (modify its UI) and add additional properties to the data source. I have achieved this in the following way:
And in the media-tree-item.element.js I changed the elementName to avoid this error : "NotSupportedError: Failed to execute 'define' on 'CustomElementRegistry': the name "umb-media-tree-item" has already been used with this registry"
This works, i'm getting my new ui elements that I define in media-tree-item.element.ts and getting my new properties that i fill in the media-tree.server.data-source.ts
Problem: Sometimes it works, and sometimes it doesn't. If I refresh the page, my code occasionally appears, but other times the default Umbraco behavior is displayed.
I always have this error in the console : "Umb.Repository.Media.Tree is already registered" that i can fix changing alias: 'Umb.Repository.Media.Tree', to alias: 'Umb.Repository.Media.Tree-V2' but in that case my code stops works.
Thanks in advance.
is working on a reply...