-
Notifications
You must be signed in to change notification settings - Fork 530
StartsWith Component #248
Description
Create a component that allows a user to traverse a list by selecting a letter of the alphabet, or entering a few letters the results should start with.
See the current browse by title page for an example
If the user clicks a link the component should update the URL to reflect the change.
If the user enters something in the "first few letters" box, and clicks "go" the component should update the URL to reflect the change.
Both clicking a link and entering something in the box and clicking "go" should work with javascript disabled. So use routerlinks, and a form submit
It would be nice if after a debounce of a few hundred ms, the URL would update automatically when the user enters a character in the "first few letters" input for people that do have JS enabled.
The parent component using this startwith component is responsible for watching the url change, and updating the rest call accordingly.
Add a startsWith: string property to the PageInfo model, and take one of those models as an @Inputfor your StartsWith component. If the input pageInfo has a startsWith value, show it in the "first few letters" box.