Skip to content

Commit

Permalink
Filter ValueMap items with same interface as Relation widget
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed Apr 18, 2024
1 parent 9d98d37 commit a086f5c
Show file tree
Hide file tree
Showing 2 changed files with 264 additions and 87 deletions.
6 changes: 3 additions & 3 deletions src/qml/RelationCombobox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Item {
featureListModel.searchTerm = searchField.displayText
}

Keys.onPressed: {
Keys.onPressed: (event)=> {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
if (featureListModel.rowCount() === 1) {
resultsList.itemAtIndex(0).performClick()
Expand Down Expand Up @@ -267,7 +267,7 @@ Item {
anchors.fill: parent
propagateComposedEvents: true

onClicked: {
onClicked: (mouse)=> {
var item = resultsList.itemAt(resultsList.contentX + mouse.x, resultsList.contentY + mouse.y)
if (!item)
return;
Expand Down Expand Up @@ -524,7 +524,7 @@ Item {
}

property bool isLastKeyPressedReturn: false
Keys.onPressed: {
Keys.onPressed: (event)=> {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
if (!isLastKeyPressedReturn) {
applyAutoCompletion()
Expand Down

0 comments on commit a086f5c

Please sign in to comment.