File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,17 @@ TABS.receiver.initialize = function (callback) {
259259 // select current serial RX type
260260 serialRxSelectElement . val ( FC . RX_CONFIG . serialrx_provider ) ;
261261
262+ // Convert to select2 and order alphabetic
263+ if ( ! GUI . isCordova ( ) ) {
264+ serialRxSelectElement . select2 ( {
265+ sorter ( data ) {
266+ return data . sort ( function ( a , b ) {
267+ return a . text . localeCompare ( b . text ) ;
268+ } ) ;
269+ } ,
270+ } ) ;
271+ }
272+
262273 if ( semver . gte ( FC . CONFIG . apiVersion , API_VERSION_1_31 ) ) {
263274 const spiRxTypes = [
264275 'NRF24_V202_250K' ,
@@ -322,6 +333,17 @@ TABS.receiver.initialize = function (callback) {
322333
323334 // select current serial RX type
324335 spiRxElement . val ( FC . RX_CONFIG . rxSpiProtocol ) ;
336+
337+ if ( ! GUI . isCordova ( ) ) {
338+ // Convert to select2 and order alphabetic
339+ spiRxElement . select2 ( {
340+ sorter ( data ) {
341+ return data . sort ( function ( a , b ) {
342+ return a . text . localeCompare ( b . text ) ;
343+ } ) ;
344+ } ,
345+ } ) ;
346+ }
325347 }
326348
327349
You can’t perform that action at this time.
0 commit comments