https://github.com/pdbeurope/pdbe-autocomplete-search
Angular 2 PDBe Autocomplete Search Component - Beta
https://github.com/pdbeurope/pdbe-autocomplete-search
Last synced: 8 months ago
JSON representation
Angular 2 PDBe Autocomplete Search Component - Beta
- Host: GitHub
- URL: https://github.com/pdbeurope/pdbe-autocomplete-search
- Owner: PDBeurope
- License: apache-2.0
- Created: 2017-02-20T10:24:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T09:12:49.000Z (over 8 years ago)
- Last Synced: 2024-12-28T03:42:10.594Z (10 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.13 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pdbe-autocomplete-search
## Getting Started
1. Clone / download the repository
2. run - 'npm install' command to download the dependencies
3. check the examples for implementation## Steps to build changes
run - 'ng build --prod --aot' command. It will update the 'dist' folder with recent build filesRefer to Angular cli (https://github.com/angular/angular-cli) to find more useful commands
## Config object
Add it to application page to customise the component
```html
PdbeAutocompleteSearchConfig = {
resultBoxAlign: 'left',
redirectOnClick: false,
searchUrl: '//www.ebi.ac.uk/pdbe/search/pdb-autocomplete/select',
fields: 'value,num_pdb_entries,var_name',
group: 'group=true&group.field=category',
groupLimit: '25',
sort: 'category+asc,num_pdb_entries+desc',
additionalParams: 'rows=20000&json.nl=map&wt=json'
}*Params*
resultBoxAlign: 'left' (default) | 'right' -- Aligns the resulbox to the input field starting from left or right as per settings
redirectOnClick: false (default) | true -- If set true, redirects to PDBe pages on result item click
searchUrl: '//www.ebi.ac.uk/pdbe/search/pdb-autocomplete/select' (default) -- Solr core / server url
fields: 'value,num_pdb_entries,var_name' (default) -- comma separated string of required fields in result
group: 'group=true&group.field=category' (default) -- comma separated string of grouping related parameters
groupLimit: '25' (default) -- group limit value
sort: 'category+asc,num_pdb_entries+desc' (default) -- comma separated string of sorting related parameters
additionalParams: 'rows=20000&json.nl=map&wt=json' (default) -- comma separated string of additional search parameters
```