Skip to content

Commit

Permalink
review dashboard #6
Browse files Browse the repository at this point in the history
  • Loading branch information
fhelfer committed May 24, 2023
1 parent 3b7d149 commit 0d392bc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ const handleUserInputForSortationsByView = (function() {

/**
* @param {Element} selectionInput
* @param {Element} checkboxInput
*/
function updateSelectedValueToFirstPossibleOption(selectionInput) {
const selectedDefaultSortation = selectionInput.querySelector('option[selected="selected"]');
if (!selectedDefaultSortation || selectedDefaultSortation.getAttribute('disabled') === 'disabled') {
const selectedDefaultSortation = selectionInput.querySelector('option[selected="selected"]:not([disabled="disabled"])');
if (!selectedDefaultSortation) {
const firstPossibleOption = selectionInput.querySelector('option:not([disabled])');
if (firstPossibleOption) {
firstPossibleOption.setAttribute('selected', 'selected');
Expand Down

0 comments on commit 0d392bc

Please sign in to comment.