Skip to content

Commit

Permalink
Merge pull request #22 from oguzhandikici/main
Browse files Browse the repository at this point in the history
Django Autocomplete Light compatibility fix
  • Loading branch information
blasferna authored Dec 22, 2024
2 parents be86e0c + 212f971 commit e17eedb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ export function getTextValue(el) {
let textValue = "";
if (type === "select") {
let tempDiv = document.createElement("div");
if (el.options[el.selectedIndex]) {
tempDiv.innerHTML = el.options[el.selectedIndex].innerText;
} else {
tempDiv.innerHTML = "-------";
}
textValue = tempDiv.innerText
.split("\n")
.map((item) => item.trim())
Expand Down

0 comments on commit e17eedb

Please sign in to comment.