1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 08:45:28 +03:00

Dont aply Select2 on andoid

This commit is contained in:
Asizon 2021-08-28 08:46:17 +02:00
parent 04b6edafbb
commit 675e03889c

View file

@ -260,13 +260,15 @@ TABS.receiver.initialize = function (callback) {
serialRxSelectElement.val(FC.RX_CONFIG.serialrx_provider);
// Convert to select2 and order alphabetic
serialRxSelectElement.select2({
sorter(data) {
return data.sort(function(a, b) {
return a.text.localeCompare(b.text);
});
},
});
if (!GUI.isCordova()) {
serialRxSelectElement.select2({
sorter(data) {
return data.sort(function(a, b) {
return a.text.localeCompare(b.text);
});
},
});
}
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_31)) {
const spiRxTypes = [
@ -332,14 +334,16 @@ TABS.receiver.initialize = function (callback) {
// select current serial RX type
spiRxElement.val(FC.RX_CONFIG.rxSpiProtocol);
// Convert to select2 and order alphabetic
spiRxElement.select2({
sorter(data) {
return data.sort(function(a, b) {
return a.text.localeCompare(b.text);
});
},
});
if (!GUI.isCordova()) {
// Convert to select2 and order alphabetic
spiRxElement.select2({
sorter(data) {
return data.sort(function(a, b) {
return a.text.localeCompare(b.text);
});
},
});
}
}