mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
refactor(input, textarea) remove unused event (#29183)
This commit is contained in:
10
core/src/components.d.ts
vendored
10
core/src/components.d.ts
vendored
@ -3796,7 +3796,6 @@ declare global {
|
|||||||
"ionChange": InputChangeEventDetail;
|
"ionChange": InputChangeEventDetail;
|
||||||
"ionBlur": FocusEvent;
|
"ionBlur": FocusEvent;
|
||||||
"ionFocus": FocusEvent;
|
"ionFocus": FocusEvent;
|
||||||
"ionStyle": StyleEventDetail;
|
|
||||||
}
|
}
|
||||||
interface HTMLIonInputElement extends Components.IonInput, HTMLStencilElement {
|
interface HTMLIonInputElement extends Components.IonInput, HTMLStencilElement {
|
||||||
addEventListener<K extends keyof HTMLIonInputElementEventMap>(type: K, listener: (this: HTMLIonInputElement, ev: IonInputCustomEvent<HTMLIonInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
addEventListener<K extends keyof HTMLIonInputElementEventMap>(type: K, listener: (this: HTMLIonInputElement, ev: IonInputCustomEvent<HTMLIonInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
||||||
@ -4512,7 +4511,6 @@ declare global {
|
|||||||
interface HTMLIonTextareaElementEventMap {
|
interface HTMLIonTextareaElementEventMap {
|
||||||
"ionChange": TextareaChangeEventDetail;
|
"ionChange": TextareaChangeEventDetail;
|
||||||
"ionInput": TextareaInputEventDetail;
|
"ionInput": TextareaInputEventDetail;
|
||||||
"ionStyle": StyleEventDetail;
|
|
||||||
"ionBlur": FocusEvent;
|
"ionBlur": FocusEvent;
|
||||||
"ionFocus": FocusEvent;
|
"ionFocus": FocusEvent;
|
||||||
}
|
}
|
||||||
@ -5958,10 +5956,6 @@ declare namespace LocalJSX {
|
|||||||
* The `ionInput` event is fired each time the user modifies the input's value. Unlike the `ionChange` event, the `ionInput` event is fired for each alteration to the input's value. This typically happens for each keystroke as the user types. For elements that accept text input (`type=text`, `type=tel`, etc.), the interface is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others, the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If the input is cleared on edit, the type is `null`.
|
* The `ionInput` event is fired each time the user modifies the input's value. Unlike the `ionChange` event, the `ionInput` event is fired for each alteration to the input's value. This typically happens for each keystroke as the user types. For elements that accept text input (`type=text`, `type=tel`, etc.), the interface is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others, the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If the input is cleared on edit, the type is `null`.
|
||||||
*/
|
*/
|
||||||
"onIonInput"?: (event: IonInputCustomEvent<InputInputEventDetail>) => void;
|
"onIonInput"?: (event: IonInputCustomEvent<InputInputEventDetail>) => void;
|
||||||
/**
|
|
||||||
* Emitted when the styles change.
|
|
||||||
*/
|
|
||||||
"onIonStyle"?: (event: IonInputCustomEvent<StyleEventDetail>) => void;
|
|
||||||
/**
|
/**
|
||||||
* A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, `"date"`, or `"password"`, otherwise it is ignored. When the type attribute is `"date"`, `pattern` will only be used in browsers that do not support the `"date"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.
|
* A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, `"date"`, or `"password"`, otherwise it is ignored. When the type attribute is `"date"`, `pattern` will only be used in browsers that do not support the `"date"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.
|
||||||
*/
|
*/
|
||||||
@ -7781,10 +7775,6 @@ declare namespace LocalJSX {
|
|||||||
* The `ionInput` event is fired each time the user modifies the textarea's value. Unlike the `ionChange` event, the `ionInput` event is fired for each alteration to the textarea's value. This typically happens for each keystroke as the user types. When `clearOnEdit` is enabled, the `ionInput` event will be fired when the user clears the textarea by performing a keydown event.
|
* The `ionInput` event is fired each time the user modifies the textarea's value. Unlike the `ionChange` event, the `ionInput` event is fired for each alteration to the textarea's value. This typically happens for each keystroke as the user types. When `clearOnEdit` is enabled, the `ionInput` event will be fired when the user clears the textarea by performing a keydown event.
|
||||||
*/
|
*/
|
||||||
"onIonInput"?: (event: IonTextareaCustomEvent<TextareaInputEventDetail>) => void;
|
"onIonInput"?: (event: IonTextareaCustomEvent<TextareaInputEventDetail>) => void;
|
||||||
/**
|
|
||||||
* Emitted when the styles change.
|
|
||||||
*/
|
|
||||||
"onIonStyle"?: (event: IonTextareaCustomEvent<StyleEventDetail>) => void;
|
|
||||||
/**
|
/**
|
||||||
* Instructional text that shows before the input has a value.
|
* Instructional text that shows before the input has a value.
|
||||||
*/
|
*/
|
||||||
|
@ -10,7 +10,7 @@ import { createColorClasses, hostContext } from '@utils/theme';
|
|||||||
import { closeCircle, closeSharp } from 'ionicons/icons';
|
import { closeCircle, closeSharp } from 'ionicons/icons';
|
||||||
|
|
||||||
import { getIonMode } from '../../global/ionic-global';
|
import { getIonMode } from '../../global/ionic-global';
|
||||||
import type { AutocompleteTypes, Color, StyleEventDetail, TextFieldTypes } from '../../interface';
|
import type { AutocompleteTypes, Color, TextFieldTypes } from '../../interface';
|
||||||
|
|
||||||
import type { InputChangeEventDetail, InputInputEventDetail } from './input-interface';
|
import type { InputChangeEventDetail, InputInputEventDetail } from './input-interface';
|
||||||
import { getCounterText } from './input.utils';
|
import { getCounterText } from './input.utils';
|
||||||
@ -295,12 +295,6 @@ export class Input implements ComponentInterface {
|
|||||||
*/
|
*/
|
||||||
@Event() ionFocus!: EventEmitter<FocusEvent>;
|
@Event() ionFocus!: EventEmitter<FocusEvent>;
|
||||||
|
|
||||||
/**
|
|
||||||
* Emitted when the styles change.
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
@Event() ionStyle!: EventEmitter<StyleEventDetail>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the native input element when the value changes
|
* Update the native input element when the value changes
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@ import type { SlotMutationController } from '@utils/slot-mutation-controller';
|
|||||||
import { createColorClasses, hostContext } from '@utils/theme';
|
import { createColorClasses, hostContext } from '@utils/theme';
|
||||||
|
|
||||||
import { getIonMode } from '../../global/ionic-global';
|
import { getIonMode } from '../../global/ionic-global';
|
||||||
import type { Color, StyleEventDetail } from '../../interface';
|
import type { Color } from '../../interface';
|
||||||
import { getCounterText } from '../input/input.utils';
|
import { getCounterText } from '../input/input.utils';
|
||||||
|
|
||||||
import type { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';
|
import type { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';
|
||||||
@ -276,12 +276,6 @@ export class Textarea implements ComponentInterface {
|
|||||||
*/
|
*/
|
||||||
@Event() ionInput!: EventEmitter<TextareaInputEventDetail>;
|
@Event() ionInput!: EventEmitter<TextareaInputEventDetail>;
|
||||||
|
|
||||||
/**
|
|
||||||
* Emitted when the styles change.
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
@Event() ionStyle!: EventEmitter<StyleEventDetail>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Emitted when the input loses focus.
|
* Emitted when the input loses focus.
|
||||||
*/
|
*/
|
||||||
|
@ -431,8 +431,7 @@ export const IonInput = /*@__PURE__*/ defineContainer<JSX.IonInput, JSX.IonInput
|
|||||||
'ionInput',
|
'ionInput',
|
||||||
'ionChange',
|
'ionChange',
|
||||||
'ionBlur',
|
'ionBlur',
|
||||||
'ionFocus',
|
'ionFocus'
|
||||||
'ionStyle'
|
|
||||||
],
|
],
|
||||||
'value', 'ion-input');
|
'value', 'ion-input');
|
||||||
|
|
||||||
@ -835,7 +834,6 @@ export const IonTextarea = /*@__PURE__*/ defineContainer<JSX.IonTextarea, JSX.Io
|
|||||||
'shape',
|
'shape',
|
||||||
'ionChange',
|
'ionChange',
|
||||||
'ionInput',
|
'ionInput',
|
||||||
'ionStyle',
|
|
||||||
'ionBlur',
|
'ionBlur',
|
||||||
'ionFocus'
|
'ionFocus'
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user