Skip to content

StartsWith Component #248

@artlowel

Description

@artlowel

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.

Metadata

Metadata

Labels

Difficulty: LowEstimated at less than 8 hours

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions