Comparing version 0.1.0-beta.15 to 0.1.0-beta.16
@@ -73,4 +73,6 @@ import * as tests from './exports'; | ||
select.onchange = () => { | ||
this.runner.preview(select.value); | ||
this.setSearchParam('preset', select.value); | ||
const value = select.value; | ||
this.runner.preview(value); | ||
if (value) | ||
this.setSearchParam('preset', value); | ||
}; | ||
@@ -80,2 +82,25 @@ const preset = this.getSearchParam('preset'); | ||
select.value = preset; | ||
// search input | ||
const input = document.createElement('input'); | ||
input.style.width = '120px'; | ||
input.placeholder = 'Search'; | ||
const filter = (value) => { | ||
for (const option of select.options) { | ||
if (option.value.toLowerCase().includes(value)) { | ||
option.hidden = false; | ||
} | ||
else { | ||
option.hidden = true; | ||
} | ||
} | ||
}; | ||
input.oninput = () => { | ||
const value = input.value.toLowerCase(); | ||
filter(value); | ||
}; | ||
const search = this.getSearchParam('search'); | ||
if (search) { | ||
input.value = search; | ||
filter(search); | ||
} | ||
// button | ||
@@ -90,4 +115,5 @@ const button = document.createElement('button'); | ||
container.appendChild(select); | ||
container.appendChild(input); | ||
container.appendChild(button); | ||
} | ||
} |
{ | ||
"name": "iperf", | ||
"version": "0.1.0-beta.15", | ||
"version": "0.1.0-beta.16", | ||
"description": "Performance Testing Framework for Front-end Renderers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32722
928