mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
style(): fix shadowed vars (#24609)
This commit is contained in:
@ -290,14 +290,14 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
||||
const triggerEl = (trigger !== undefined) ? document.getElementById(trigger) : null;
|
||||
if (!triggerEl) { return; }
|
||||
|
||||
const configureTriggerInteraction = (triggerEl: HTMLElement, modalEl: HTMLIonModalElement) => {
|
||||
const configureTriggerInteraction = (trigEl: HTMLElement, modalEl: HTMLIonModalElement) => {
|
||||
const openModal = () => {
|
||||
modalEl.present();
|
||||
}
|
||||
triggerEl.addEventListener('click', openModal);
|
||||
trigEl.addEventListener('click', openModal);
|
||||
|
||||
return () => {
|
||||
triggerEl.removeEventListener('click', openModal);
|
||||
trigEl.removeEventListener('click', openModal);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,6 +374,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
const lastColumn = numericPickers[1];
|
||||
|
||||
let value = inputEl.value;
|
||||
let minuteValue;
|
||||
switch (value.length) {
|
||||
case 1:
|
||||
this.searchColumn(firstColumn, value);
|
||||
@ -396,7 +397,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
* for a match in the minutes column
|
||||
*/
|
||||
if (value.length === 1) {
|
||||
const minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
||||
minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
||||
}
|
||||
break;
|
||||
@ -417,7 +418,7 @@ export class PickerInternal implements ComponentInterface {
|
||||
* we can check the second value
|
||||
* for a match in the minutes column
|
||||
*/
|
||||
const minuteValue = (value.length === 1) ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
||||
minuteValue = (value.length === 1) ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
||||
|
||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
||||
break;
|
||||
|
@ -177,7 +177,7 @@ export class Radio implements ComponentInterface {
|
||||
disabled={disabled}
|
||||
tabindex="-1"
|
||||
id={inputId}
|
||||
ref={el => this.nativeInput = el as HTMLInputElement}
|
||||
ref={nativeEl => this.nativeInput = nativeEl as HTMLInputElement}
|
||||
/>
|
||||
</Host>
|
||||
);
|
||||
|
@ -552,8 +552,8 @@ interface RangeKnob {
|
||||
handleKeyboard: (name: KnobName, isIncrease: boolean) => void;
|
||||
}
|
||||
|
||||
const renderKnob = (isRTL: boolean, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, labelText, pinFormatter }: RangeKnob) => {
|
||||
const start = isRTL ? 'right' : 'left';
|
||||
const renderKnob = (rtl: boolean, { knob, value, ratio, min, max, disabled, pressed, pin, handleKeyboard, labelText, pinFormatter }: RangeKnob) => {
|
||||
const start = rtl ? 'right' : 'left';
|
||||
|
||||
const knobStyle = () => {
|
||||
const style: any = {};
|
||||
|
@ -225,13 +225,13 @@ export class Toggle implements ComponentInterface {
|
||||
}
|
||||
}
|
||||
|
||||
const shouldToggle = (isRTL: boolean, checked: boolean, deltaX: number, margin: number): boolean => {
|
||||
const shouldToggle = (rtl: boolean, checked: boolean, deltaX: number, margin: number): boolean => {
|
||||
if (checked) {
|
||||
return (!isRTL && (margin > deltaX)) ||
|
||||
(isRTL && (- margin < deltaX));
|
||||
return (!rtl && (margin > deltaX)) ||
|
||||
(rtl && (- margin < deltaX));
|
||||
} else {
|
||||
return (!isRTL && (- margin < deltaX)) ||
|
||||
(isRTL && (margin > deltaX));
|
||||
return (!rtl && (- margin < deltaX)) ||
|
||||
(rtl && (margin > deltaX));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user