Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
691a8210
Commit
691a8210
authored
Oct 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(SearchBox): create `_filter` function
parent
a1f33b42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
SearchBox.qml
tests/ui/modules/Common/SearchBox.qml
+13
-12
No files found.
tests/ui/modules/Common/SearchBox.qml
View file @
691a8210
...
@@ -44,6 +44,18 @@ Item {
...
@@ -44,6 +44,18 @@ Item {
_isOpen
=
true
_isOpen
=
true
}
}
function
_filter
(
text
)
{
console
.
assert
(
model
.
setFilterFixedString
!=
null
,
'
`model.setFilterFixedString` must be defined.
'
)
model
.
setFilterFixedString
(
text
)
if
(
model
.
invalidate
)
{
model
.
invalidate
()
}
}
// -----------------------------------------------------------------
// -----------------------------------------------------------------
implicitHeight
:
searchField
.
height
implicitHeight
:
searchField
.
height
...
@@ -63,18 +75,7 @@ Item {
...
@@ -63,18 +75,7 @@ Item {
Keys.onEscapePressed
:
searchBox
.
hideMenu
()
Keys.onEscapePressed
:
searchBox
.
hideMenu
()
onActiveFocusChanged
:
activeFocus
&&
searchBox
.
showMenu
()
onActiveFocusChanged
:
activeFocus
&&
searchBox
.
showMenu
()
onTextChanged
:
{
onTextChanged
:
_filter
()
console
.
assert
(
model
.
setFilterFixedString
!=
null
,
'
`model.setFilterFixedString` must be defined.
'
)
model
.
setFilterFixedString
(
text
)
if
(
model
.
invalidate
)
{
model
.
invalidate
()
}
}
}
}
// Wrap the search box menu in a window.
// Wrap the search box menu in a window.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment