feat(Storybook): scrollbar and button for clearing search input added
This commit is contained in:
parent
038ab08765
commit
1ac4c34a63
|
@ -32,15 +32,25 @@ ColumnLayout {
|
||||||
sourceModel: filteredModel
|
sourceModel: filteredModel
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
RowLayout {
|
||||||
id: textField
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "search"
|
|
||||||
|
|
||||||
Keys.onEscapePressed: {
|
TextField {
|
||||||
text = ""
|
id: textField
|
||||||
focus = false
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "search"
|
||||||
|
|
||||||
|
Keys.onEscapePressed: {
|
||||||
|
clear()
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
text: "❌"
|
||||||
|
|
||||||
|
onClicked: textField.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ ListView {
|
||||||
readonly property string foldedPrefix: "▶ "
|
readonly property string foldedPrefix: "▶ "
|
||||||
readonly property string unfoldedPrefix: "▼ "
|
readonly property string unfoldedPrefix: "▼ "
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {}
|
||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
id: delegate
|
id: delegate
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue