Skip to content

Commit

Permalink
perf: Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dhardtke committed Apr 29, 2021
1 parent 33fcbcc commit 56fc70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tpl/templates/_components/rating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function Rating(name: string, value = 0, readonly = false) {
const half = i % 2 !== 0;
const current = i / 2;
stars += html`
<input type="radio" id="${name}-${i}" name="${name}" value="${current}" autocomplete="off"
<input type="radio" id="${name}-${i}" name="${name}" value="${current}" ${!readonly && `autocomplete="off"`}
${current === comparisonValue && " checked"}${readonly && " disabled"}/>
<label for="${name}-${i}" ${!readonly && `title="${current}"`}${half && ` class="half"`}>
${Icon(`star-${half ? "half" : "fill"}` as IconName)}
Expand Down

0 comments on commit 56fc70b

Please sign in to comment.