We have a value map with large integer values. Once we reach a specific ID/value threshold, the sort becomes inconsistent across browsers.
For example, if we have the following value map defined below, on Firefox, the values appear in the SelectItem ordered by their defined order in the value map, specifically, "A, B, C, D, E, ...". In Chrome and IE11, they appear ordered by the integer ID, specifically, "A, B, C, E, H, ...". If we remove all values with ID greater than or equal to "16384", the values are sorted in the SelectItem by ID consistently across all browsers.
In some cases, we may want the values in the SelectItem ordered by ID and in some cases we may want the values ordered in their defined ordered.
1. Is there an explanation for the inconsistency between browsers?
2. Is there a way on a SelectItem to control the order in which the values appear in the SelectItem (i.e defined order vs. ID order)?
SmartClient Version: v9.1p_2014-08-11/Pro Deployment (built 2014-08-11)
Thanks
For example, if we have the following value map defined below, on Firefox, the values appear in the SelectItem ordered by their defined order in the value map, specifically, "A, B, C, D, E, ...". In Chrome and IE11, they appear ordered by the integer ID, specifically, "A, B, C, E, H, ...". If we remove all values with ID greater than or equal to "16384", the values are sorted in the SelectItem by ID consistently across all browsers.
Code:
<field name="aField" type="integer" multiple="true"> <valueMap> <value ID="1">A</value> <value ID="2">B</value> <value ID="4">C</value> <value ID="524288">D</value> <value ID="8">E</value> <value ID="4194304">F</value> <value ID="32768">G</value> <value ID="16">H</value> <value ID="131072">I</value> <value ID="32">J</value> <value ID="64">K</value> <value ID="128">L</value> <value ID="65536">M</value> <value ID="256">N</value> <value ID="512">O</value> <value ID="262144">P</value> <value ID="1024">Q</value> <value ID="2048">R</value> <value ID="4096">S</value> <value ID="8192">T</value> <value ID="16384">U</value> </valueMap> </field>
1. Is there an explanation for the inconsistency between browsers?
2. Is there a way on a SelectItem to control the order in which the values appear in the SelectItem (i.e defined order vs. ID order)?
SmartClient Version: v9.1p_2014-08-11/Pro Deployment (built 2014-08-11)
Thanks
Comment