feat(StatusSearchPopup): introduce forceActiveFocus API
This is used to enforce focus on the search input when the popup is opened. In fact users decide to override the search popup's `onOpened` handler, they still get access to this API to make use of it.
This commit is contained in:
parent
7bd484c339
commit
782c0eecfe
|
@ -51,10 +51,19 @@ StatusModal {
|
|||
setSearchSelection(defaultSearchLocationText, "", "", false, "", "transparent")
|
||||
}
|
||||
|
||||
function forceActiveFocus() {
|
||||
contentItem.searchInput.forceActiveFocus()
|
||||
}
|
||||
|
||||
onOpened: {
|
||||
forceActiveFocus();
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
width: parent.width
|
||||
height: root.height
|
||||
property alias searchText: inputText.text
|
||||
property alias searchInput: inputText
|
||||
|
||||
ColumnLayout {
|
||||
id: contentItemColumn
|
||||
|
|
Loading…
Reference in New Issue