Skip to content

Commit

Permalink
Insure that search bar reacts to partial text entered by all virtual …
Browse files Browse the repository at this point in the history
…keyboards
  • Loading branch information
nirvn authored and github-actions[bot] committed Oct 1, 2024
1 parent 398caea commit fb5a67e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/qml/RelationCombobox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Item {

onOpened: {
if (searchableText.typedFilter != '') {
searchBar.searchTerm = searchableText.typedFilter;
searchBar.setSearchTerm(searchableText.typedFilter);
}
if (resultsList.contentHeight > resultsList.height) {
searchBar.focusOnTextField();
Expand Down Expand Up @@ -99,7 +99,7 @@ Item {
height: childrenRect.height

onSearchTermChanged: {
featureListModel.searchTerm = searchTerm;
featureListModel.setSearchTerm(searchTerm);
}

onReturnPressed: {
Expand Down
6 changes: 5 additions & 1 deletion src/qml/imports/Theme/QfSearchBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Theme
Item {
id: searchBar

property alias searchTerm: searchField.text
property alias searchTerm: searchField.displayText
property string placeHolderText: qsTr("Search")

signal returnPressed
Expand Down Expand Up @@ -71,6 +71,10 @@ Item {
searchField.forceActiveFocus();
}

function setSearchTerm(term) {
searchField.text = term;
}

function clear() {
searchField.text = '';
}
Expand Down

0 comments on commit fb5a67e

Please sign in to comment.