If one of the data-sources above does not fit your needs, you can extend Data Picker with your own custom data source.
+To do this, read the documentation on extending with your own custom data source.
" } }, } }); @@ -118,6 +123,14 @@ public DataPickerConfigurationEditor( } }); + Fields.Add(new ConfigurationField + { + Key = "hideSearch", + Name = "Hide search box?", + Description = "Hide the search box in the overlay panel.", + View = "boolean", + }); + Fields.Add(new MaxItemsConfigurationField(ioHelper)); Fields.Add(new EnableDevModeConfigurationField()); } diff --git a/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.js b/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.js index 3c54642b..9fca19ba 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.js +++ b/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.js @@ -1,4 +1,4 @@ -/* Copyright © 2023 Lee Kelleher. +/* Copyright © 2023 Lee Kelleher. * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -27,6 +27,7 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors. defaultValue: [], displayMode: "cards", enableDevMode: 0, + hideSearch: 0, maxItems: 0, overlaySize: "medium", overlayView: "", @@ -113,6 +114,7 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors. currentPageId: config.currentPageId, dataTypeKey: $scope.model.dataTypeKey, enableMultiple: config.maxItems !== 1, + hideSearch: Object.toBoolean(config.hideSearch), listType: config.displayMode, pageSize: config.pageSize, }, diff --git a/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.overlay.html b/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.overlay.html index 26373542..95e0eef6 100644 --- a/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.overlay.html +++ b/src/Umbraco.Community.Contentment/DataEditors/DataPicker/data-picker.overlay.html @@ -1,4 +1,4 @@ - @@ -15,7 +15,7 @@