Skip to content

Commit 948464a

Browse files
authored
Search: filters enabled by default (#612)
Read the addons API and enable/disable the filters by default based on that data. This is an initial and immediate simple solution for #22 without implementing all the features. Basically, all projects that have subprojects will now have "Include subprojects" checked by default. In the future, we will allow users to enable/disable this per project.
1 parent 117b7a3 commit 948464a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/search.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ export class SearchElement extends LitElement {
111111
userFilters.push({
112112
name: filter[0],
113113
value: filter[1],
114+
default: filter[2],
114115
});
115116
}
116117
this.filters = userFilters;
@@ -239,6 +240,7 @@ export class SearchElement extends LitElement {
239240
id="filter-${index}"
240241
type="checkbox"
241242
value="${filter.value}"
243+
?checked=${filter.default}
242244
/>
243245
<label for="filter-${index}"> ${filter.name} </label>
244246
</li>

0 commit comments

Comments
 (0)