项目作者: llinq

项目描述 :
A simple ionic search component that renders an input to display the value as well as a search page.
高级语言: TypeScript
项目地址: git://github.com/llinq/ion-search-input.git
创建时间: 2019-08-28T01:12:20Z
项目社区:https://github.com/llinq/ion-search-input

开源协议:MIT License

下载


[DEPRECATED]

ion-search-input

A simple ionic search component that renders an input to display the value as well as a search page.

How to use

npm install ion-search-input --save

Import in module
  1. import { IonSearchInputModule } from 'ion-search-input';
  2. @NgModule({
  3. //...
  4. imports: [
  5. //...
  6. IonSearchInputModule
  7. ],
  8. //...
  9. })
  10. export class AppModule {}
View
  1. <ion-search-input [label]="'Teste'" [mock]="true" (selectedEvent)="test($event)"></ion-search-input>`

Input Properties

Attr Type Details
label string Label that is displayed on the input as well as the navbar title (search screen).
mock boolean If true, will populate the input data with a mocked JSON that exists in the keyValue class. Default: false
data keyValue[] JSON which will render the component options, the properties are id: number, value: string. More information in keyValue section.
model number Default value selected.
placeholder string Input Placeholder. Default: 'Click to search'

Output Events

Attr Details
selectedEvent Event triggered when selecting a radio and clicking the save button. The id of the selected option is sent.

Screenshots