This surprisingly came up several times this week on Discord — a page that should fetch, filter and search some data through a <form> and search params in load. My idea was a simple products, words, fruits etc. page which:
- allows you to filter items by type using checkboxes
- has a
<input type="search" /> to search for specific items
- when JS is available
<input type="search" /> submits the form on:input (debounced)
- checkboxes etc. submit the form
on:change
- products/words are stored in an array or
Map that acts as a database
This surprisingly came up several times this week on Discord — a page that should fetch, filter and search some data through a
<form>and search params inload. My idea was a simple products, words, fruits etc. page which:<input type="search" />to search for specific items<input type="search" />submits the formon:input(debounced)on:changeMapthat acts as a database