gregor.tusar
10/09/2023, 8:07 AMeditorService.contentPicker
editor for that job.
There are two issues with it:
1. submit
function parameter contains selected
array, but it always includes only the clicked item and not the whole selection, so I should keep track of actually selected items manually
2. there is no option to pass already selected nodes to the editor to be able to edit the selection
https://apidocs.umbraco.com/v10/ui/#/api/umbraco.services.editorService
Is there any other more suitable editor for that ?gregor.tusar
12/21/2023, 12:11 PMSven Geusens
12/21/2023, 12:18 PMgregor.tusar
12/21/2023, 12:55 PMvalue
, but it does not seem to work...
https://github.com/umbraco/Umbraco.CMS.Backoffice/blob/28f8de57a5833a9a15ded74816d6314ac92be20e/src/packages/documents/documents/property-editors/document-picker/property-editor-ui-document-picker.element.ts#L9
https://cdn.discordapp.com/attachments/1160850881479180298/1187377680736333844/image.png?ex=6596aaa3&is=658435a3&hm=5acaa620fea20899c44279ffb7484c8781f673f98effcac956ddf3901f7f62ac&gregor.tusar
12/22/2023, 7:30 AMselectedIds
, value
, with both array of strings and string of joined ids separeated by ,
.gregor.tusar
12/22/2023, 7:50 AMvar editor = {
multipicker: true,
startNodeId: startNodeUdi,
value: selectedItems,
selectedIds: selectedItems,
submit: function (selected) {
$scope.model.value[modelArrayName] = addOrRemoveItem($scope.model.value[modelArrayName], selected.selection[0].udi)
populateVM(modelArrayName);
},
close: function () {
populateVM(modelArrayName);
editorService.close();
}
}
editorService.contentPicker(editor);
gregor.tusar
12/22/2023, 8:57 AMumbraco.controllers
, and I saw this line $scope.model.selection = [];
on the beggining of the Umbraco.Editors.TreePickerController
. It looks like there is no chance to set the selection from the outside.
How does original umbaco editors work that they pass this info to the next editor?