Type in the search-bar and the remote package list reacts.

It doesn't do any actual searching yet though. Also switching between page doesn't work like it's supposed to yet (and probalby more of that sort of cases).

part of CURA-8559
This commit is contained in:
Remco Burema 2021-11-12 14:01:05 +01:00
parent bc0b7301e5
commit d7ac307ace
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 30 additions and 3 deletions

View file

@ -14,6 +14,8 @@ Window
id: marketplaceDialog
property variant catalog: UM.I18nCatalog { name: "cura" }
signal searchStringChanged(string new_search)
minimumWidth: UM.Theme.getSize("modal_window_minimum").width
minimumHeight: UM.Theme.getSize("modal_window_minimum").height
width: minimumWidth
@ -92,7 +94,7 @@ Window
id: searchBar
Layout.preferredHeight: parent.height
Layout.fillWidth: true
//onTextEdited: // TODO!
onTextEdited: marketplaceDialog.searchStringChanged(text)
}
// Page selection.
@ -168,6 +170,11 @@ Window
function onLoaded()
{
pageTitle.text = content.item.pageTitle
searchStringChanged.connect(onSearchStringChanged)
}
function onSearchStringChanged(new_search)
{
content.item.model.searchString = new_search
}
}
}