feat(type_de_champ_editor): allow admin to move champ after previous champ. useless but better a11y

This commit is contained in:
mfo 2024-04-11 11:00:08 +02:00
parent 4da36531d4
commit 45d45c0d05
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC

View file

@ -48,14 +48,6 @@ export class SelectChampPositionTemplateController extends ApplicationController
option.setAttribute('disabled', 'disabled');
}
});
options.map((option, index) => {
const previousOption = options[index - 1];
// can't move current element after previous element
if (previousOption && option.value == focusedSelectStableId) {
previousOption.setAttribute('selected', 'selected');
previousOption.setAttribute('disabled', 'disabled');
}
});
focusedSelect.innerHTML = options
.map((option) => option.outerHTML)