Skip to content

Commit

Permalink
WIP demo
Browse files Browse the repository at this point in the history
  • Loading branch information
fergiemcdowall committed Nov 2, 2023
1 parent 9287fa7 commit 873e264
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions demo2/lib/search-index-esm-5.0.0-rc1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/ui/Facet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export class Facet {
constructor (
constructor(
{
facetOptionTemplate = (rOption, active) => `
<input class="filter-select"
Expand Down Expand Up @@ -34,7 +34,7 @@ export class Facet {
this.title = title
}

update = facets => {
update = (facets, source) => {
this.el.innerHTML =
this.facetTitleTemplate(this.title) +
facets
Expand Down
4 changes: 2 additions & 2 deletions src/ui/SearchInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { autocomplete } from './autocomplete.js'

// TODO: should be possible to customise templates
export class SearchInput {
constructor (
constructor(
{
elementId = 'searchInput',
el = document.getElementById(elementId),
Expand All @@ -13,7 +13,7 @@ export class SearchInput {
) {
el.addEventListener('input', e => {
paging.page.NUMBER = 0 // always go back to page 1 on a new search
search(this.value)
search()
})

autocomplete(el, autoCompleteFunction, search)
Expand Down
2 changes: 1 addition & 1 deletion src/ui/UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Facet } from './Facet.js'
import { SearchInput } from './SearchInput.js'

export class UI {
constructor ({
constructor({
index = null,
count = {},
hits = {},
Expand Down

0 comments on commit 873e264

Please sign in to comment.