diff --git a/app/qml/components/MMListMultiselectDrawer.qml b/app/qml/components/MMListMultiselectDrawer.qml index 25e7ad656..b94ee4d64 100644 --- a/app/qml/components/MMListMultiselectDrawer.qml +++ b/app/qml/components/MMListMultiselectDrawer.qml @@ -33,7 +33,9 @@ MMDrawer { interactive: !listViewComponent.interactive - drawerBottomMargin: 0 + drawerBottomMargin: listViewComponent.count === 0 + ? (__style.margin20 + __style.safeAreaBottom) + : 0 drawerContent: Item { width: parent.width @@ -70,7 +72,6 @@ MMDrawer { MMScrollView { width: parent.width height: Math.min( contentHeight, root.drawerContentAvailableHeight - internal.searchBarVerticalSpace ) - enabled: contentHeight > height Loader { @@ -87,7 +88,7 @@ MMDrawer { width: parent.width height: Math.min( contentHeight, root.drawerContentAvailableHeight - internal.searchBarVerticalSpace ) - + visible: count > 0 interactive: contentHeight > height clip: true diff --git a/app/qml/form/editors/MMFormValueMapEditor.qml b/app/qml/form/editors/MMFormValueMapEditor.qml index ecb3531d0..effcbedb9 100644 --- a/app/qml/form/editors/MMFormValueMapEditor.qml +++ b/app/qml/form/editors/MMFormValueMapEditor.qml @@ -85,6 +85,17 @@ MMFormComboboxBaseEditor { drawerHeader.title: root._fieldTitle + emptyStateDelegate: Item { + width: parent.width + height: noItemsText.implicitHeight + __style.margin40 + + MMComponents.MMText { + id: noItemsText + text: qsTr( "No items" ) + anchors.centerIn: parent + } + } + list.model: listModel selected: root.preselectedItems diff --git a/app/qml/form/editors/MMFormValueRelationEditor.qml b/app/qml/form/editors/MMFormValueRelationEditor.qml index 3d40e50ff..ae4016be2 100644 --- a/app/qml/form/editors/MMFormValueRelationEditor.qml +++ b/app/qml/form/editors/MMFormValueRelationEditor.qml @@ -69,9 +69,19 @@ MMFormComboboxBaseEditor { dropdownLoader.sourceComponent: Component { MMComponents.MMListMultiselectDrawer { - drawerHeader.title: root._fieldTitle + emptyStateDelegate: Item { + width: parent.width + height: noItemsText.implicitHeight + __style.margin40 + + MMComponents.MMText { + id: noItemsText + text: qsTr( "No items" ) + anchors.centerIn: parent + } + } + multiSelect: internal.allowMultivalue withSearch: vrModel.count > 5 showFullScreen: multiSelect || withSearch