5.1.1 • Published 3 years ago

@terminus/ui-search v5.1.1

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

CI/CD Status Codecov MIT License
NPM version Library size

Table of Contents

Installation

Use the ng add command to quickly install all the needed dependencies:

ng add @terminus/ui-search

CSS imports

In your top-level stylesheet, add these imports:

@import '~@terminus/design-tokens/css/library-design-tokens.css';
@import '~@terminus/ui-styles/terminus-ui.css';

CSS resources

Load the needed font families by adding this link to the <head> of your application:

<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">

Usage

<ts-search
  inputHint="Enter at least 17 characters"
  inputLabel="Search for a tactic"
></ts-search>

Auto-submit

When enabled, the submit button will not be shown and debounced queries will be emitted automatically.

<ts-search [autoSubmit]="true"></ts-search>

Button theme

Any valid TsButtonThemeTypes can be passed in:

<ts-search buttonTheme="secondary"></ts-search>

Error message

A custom error message can be displayed:

<ts-search errorMessage="Special characters not allowed."></ts-search>

No validation or hint

The space reserved for the validation message or hint can be removed if it is not needed:

<ts-search [noValidationOrHint]="true"></ts-search>

Events

<ts-search (submitted)="myFunction($event)"></ts-search>
EventDescriptionPayload
changedFired when the drawer expansion startsstring
clearedFired when the drawer collapse startsboolean
submittedFired when the search query is submitted (manually or automatically)TsSearchResponse

Default options

With the forRoot statement you can configure module.

@NgModule({
  imports: [
    TsSearchModule.forRoot({ debounceTime: 400 })
  ]
})
export class YourModule { }
PropertyDescriptionPayload
debounceTimeDiscard emitted values that take less than the specified time between outputnumber
5.1.1

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

4.1.0

3 years ago

4.0.0

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.11

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.3

4 years ago

2.0.4

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago