mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Update sort function (#3167)
This commit is contained in:
parent
454627c05f
commit
1f7e77938c
3 changed files with 27 additions and 31 deletions
|
@ -252,13 +252,7 @@ receiver.initialize = function (callback) {
|
|||
|
||||
// Convert to select2 and order alphabetic
|
||||
if (!GUI.isCordova()) {
|
||||
serialRxSelectElement.select2({
|
||||
sorter(data) {
|
||||
return data.sort(function(a, b) {
|
||||
return a.text.localeCompare(b.text);
|
||||
});
|
||||
},
|
||||
});
|
||||
serialRxSelectElement.sortSelect().select2();
|
||||
}
|
||||
|
||||
const spiRxTypes = [
|
||||
|
@ -314,13 +308,7 @@ receiver.initialize = function (callback) {
|
|||
|
||||
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);
|
||||
});
|
||||
},
|
||||
});
|
||||
spiRxElement.sortSelect().select2();
|
||||
}
|
||||
|
||||
if (FC.FEATURE_CONFIG.features.isEnabled('RX_SPI') && FC.RX_CONFIG.rxSpiProtocol == 19 && semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_45)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue