EasyUI Forum
May 12, 2024, 04:49:02 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ComboBox data-value relation  (Read 4576 times)
chrwei
Full Member
***
Posts: 219


View Profile Email
« on: March 10, 2020, 10:02:53 AM »

I've got an issue where for various reasons my ComboBox value is getting set before the data object is populated.  once the object is set, the displayed value does not update.

is that something the ComboBox should be handling, or do I need to do something different to make sure the value isn't set until the object is populated?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: March 11, 2020, 12:15:42 AM »

Make sure the value exists in the data object. Once the data object is loaded, the displaying text will be updated according to the data object.

Another way to set the 'value' with 'text' on the ComboBox component is to call the 'setValue' method although the data object is not loaded yet.
Code:
this.combo.setValue({ value: 12, text: 'text12' });
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #2 on: March 12, 2020, 06:05:10 AM »

ended up being a whitespace issue.  thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!