This commit is contained in:
yumoqing 2021-06-21 13:53:49 +08:00
parent dd56841bc9
commit f594975508

View File

@ -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):