From f59497550839f1cbe672bf45114778c67e22dd80 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 21 Jun 2021 13:53:49 +0800 Subject: [PATCH] bugfix --- kivyblocks/widgetExt/inputext.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kivyblocks/widgetExt/inputext.py b/kivyblocks/widgetExt/inputext.py index 35d278f..e95a87c 100755 --- a/kivyblocks/widgetExt/inputext.py +++ b/kivyblocks/widgetExt/inputext.py @@ -172,13 +172,15 @@ class MyDropDown(DropDown): def getTextByValue(self,v): for d in self.si_data: if d[self.valueField] == v: - return d[self.textField] + r = d[self.textField] + return r if r else v return str(v) def getValueByText(self,v): for d in self.si_data: - if d[self.textField] == v: - return d[self.valueField] + if d[self.textField] == v: + r = d[self.valueField] + return r return '' def setData(self,data):