fix(html): remove filter clear button

This commit is contained in:
Simon Knott 2024-11-25 10:51:10 +01:00
parent 39285c4667
commit caf8389ab7
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -49,12 +49,12 @@ export const HeaderView: React.FC<React.PropsWithChildren<{
<form className='subnav-search' onSubmit={
event => {
event.preventDefault();
navigate(`#?q=${filterText ? encodeURIComponent(filterText) : ''}`);
navigate(filterText ? '#?' + new URLSearchParams({ q: filterText }) : '/');
}
}>
{icons.search()}
{/* Use navigationId to reset defaultValue */}
<input type='search' spellCheck={false} className='form-control subnav-search-input input-contrast width-full' value={filterText} onChange={e => {
<input spellCheck={false} className='form-control subnav-search-input input-contrast width-full' value={filterText} onChange={e => {
setFilterText(e.target.value);
}}></input>
</form>