mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
@ -643,8 +643,8 @@ export class IonRow {
|
||||
}
|
||||
export declare interface IonSearchbar extends Components.IonSearchbar {
|
||||
}
|
||||
@ProxyCmp({ inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"], "methods": ["setFocus", "getInputElement"] })
|
||||
@Component({ selector: "ion-searchbar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"] })
|
||||
@ProxyCmp({ inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"], "methods": ["setFocus", "getInputElement"] })
|
||||
@Component({ selector: "ion-searchbar", changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "placeholder", "searchIcon", "showCancelButton", "spellcheck", "type", "value"] })
|
||||
export class IonSearchbar {
|
||||
ionInput!: EventEmitter<CustomEvent>;
|
||||
ionChange!: EventEmitter<CustomEvent>;
|
||||
|
@ -938,6 +938,7 @@ ion-searchbar,prop,clearIcon,string | undefined,undefined,false,false
|
||||
ion-searchbar,prop,color,string | undefined,undefined,false,false
|
||||
ion-searchbar,prop,debounce,number,250,false,false
|
||||
ion-searchbar,prop,disabled,boolean,false,false,false
|
||||
ion-searchbar,prop,enterkeyhint,"done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined,undefined,false,false
|
||||
ion-searchbar,prop,inputmode,"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefined,undefined,false,false
|
||||
ion-searchbar,prop,mode,"ios" | "md",undefined,false,false
|
||||
ion-searchbar,prop,placeholder,string,'Search',false,false
|
||||
|
8
core/src/components.d.ts
vendored
8
core/src/components.d.ts
vendored
@ -1943,6 +1943,10 @@ export namespace Components {
|
||||
* If `true`, the user cannot interact with the input.
|
||||
*/
|
||||
"disabled": boolean;
|
||||
/**
|
||||
* A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`.
|
||||
*/
|
||||
"enterkeyhint"?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
||||
/**
|
||||
* Returns the native `<input>` element used under the hood.
|
||||
*/
|
||||
@ -5097,6 +5101,10 @@ declare namespace LocalJSX {
|
||||
* If `true`, the user cannot interact with the input.
|
||||
*/
|
||||
"disabled"?: boolean;
|
||||
/**
|
||||
* A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`.
|
||||
*/
|
||||
"enterkeyhint"?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send";
|
||||
/**
|
||||
* A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
|
||||
*/
|
||||
|
@ -252,6 +252,7 @@ export const SearchBarExamples: React.FC = () => {
|
||||
| `color` | `color` | The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | `string \| undefined` | `undefined` |
|
||||
| `debounce` | `debounce` | Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. | `number` | `250` |
|
||||
| `disabled` | `disabled` | If `true`, the user cannot interact with the input. | `boolean` | `false` |
|
||||
| `enterkeyhint` | `enterkeyhint` | A hint to the browser for which enter key to display. Possible values: `"enter"`, `"done"`, `"go"`, `"next"`, `"previous"`, `"search"`, and `"send"`. | `"done" \| "enter" \| "go" \| "next" \| "previous" \| "search" \| "send" \| undefined` | `undefined` |
|
||||
| `inputmode` | `inputmode` | A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`. | `"decimal" \| "email" \| "none" \| "numeric" \| "search" \| "tel" \| "text" \| "url" \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
|
||||
| `placeholder` | `placeholder` | Set the input's placeholder. `placeholder` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `<Ionic>` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) | `string` | `'Search'` |
|
||||
|
@ -88,6 +88,13 @@ export class Searchbar implements ComponentInterface {
|
||||
*/
|
||||
@Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
||||
|
||||
/**
|
||||
* A hint to the browser for which enter key to display.
|
||||
* Possible values: `"enter"`, `"done"`, `"go"`, `"next"`,
|
||||
* `"previous"`, `"search"`, and `"send"`.
|
||||
*/
|
||||
@Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
||||
|
||||
/**
|
||||
* Set the input's placeholder.
|
||||
* `placeholder` can accept either plaintext or HTML as a string.
|
||||
@ -460,6 +467,7 @@ export class Searchbar implements ComponentInterface {
|
||||
ref={el => this.nativeInput = el}
|
||||
class="searchbar-input"
|
||||
inputMode={this.inputmode}
|
||||
enterKeyHint={this.enterkeyhint}
|
||||
onInput={this.onInput}
|
||||
onBlur={this.onBlur}
|
||||
onFocus={this.onFocus}
|
||||
|
Reference in New Issue
Block a user