Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vetri02/searchwidget

Search Widget with multiselect
https://github.com/vetri02/searchwidget

Last synced: 2 days ago
JSON representation

Search Widget with multiselect

Awesome Lists containing this project

README

        

# Search Widget

Search Widget with multiselect

### [Demo - Search](http://even-ray.surge.sh/)

## Setup

Run `npm install` to set things up.

If that doesn't work, it may be necessary to use `sudo npm install`.

With this set up, you should now be able to run:

gulp

This will process any Sass (SCSS) files, translate ES6 to ES5 and launch a web browser showing the current files. Making changes to the files should result in the page updating automatically.

## Libraries/Frameworks

- jQuery (DOM Manipulation)
- Lodash (Utilities)

## Assumptions

- User might not go in and edit the already selected value inbetween
- Only user selections end up in the input

## Approach

- When user starts typing, we fetchresults based of his query, to stop making multiple calls on each keystroke we debounce the call.
- If the typed word is a first entry we fetchresults for the query as it is.
- Subsequent words or sent removing the previosly selected entries
- Selected entries are appended to the search input
- User can select through click or keyborad selection
- Up and Down arrow selections are enabled. Can use Enter to select an entry

### License

MIT