Skip to content

Commit 2c3ea13

Browse files
committed
Auto-activate selection when there is one match
1 parent a67d84f commit 2c3ea13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flare/viur/widgets/list.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ def onRequestList(self, skellist):
149149
) # register to change State for active State handling
150150
self.listelements.appendChild(skelwidget)
151151

152+
if len(self.listelements.children()) == 1:
153+
self.activateSelection(skelwidget)
154+
self.acceptSelection()
155+
152156
def onActiveSelectionChanged(self, event, *args, **kwargs):
153157
if event:
154158
self.selectbtn["disabled"] = False

0 commit comments

Comments
 (0)