Skip to content

Commit

Permalink
since search is lossy, if we get an exact match float that to the sta…
Browse files Browse the repository at this point in the history
…rt of the picker
  • Loading branch information
BarryCarlyon committed Apr 22, 2024
1 parent 024f24b commit a1ad71e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/channel_dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,12 @@ <h2>Extensions</h2>

hit.textContent = name;
hit.style.backgroundImage = `url(${box_art_url})`;
search_results.append(hit);
// if exact match put it first
if (name.toLowerCase() == channel_game_name.value.toLowerCase()) {
search_results.prepend(hit);
} else {
search_results.append(hit);
}
});
}
}
Expand Down

0 comments on commit a1ad71e

Please sign in to comment.