fix(input, textarea, select): do not show highlight in item (#26689)
resolves #26687
@@ -640,7 +640,8 @@ export class Input implements ComponentInterface {
|
||||
const { disabled, fill, readonly, shape, inputId, labelPlacement } = this;
|
||||
const mode = getIonStylesheet(this);
|
||||
const value = this.getValue();
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline';
|
||||
const inItem = hostContext('ion-item', this.el);
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline' && !inItem;
|
||||
|
||||
return (
|
||||
<Host
|
||||
@@ -652,7 +653,7 @@ export class Input implements ComponentInterface {
|
||||
[`input-fill-${fill}`]: fill !== undefined,
|
||||
[`input-shape-${shape}`]: shape !== undefined,
|
||||
[`input-label-placement-${labelPlacement}`]: true,
|
||||
'in-item': hostContext('ion-item', this.el),
|
||||
'in-item': inItem,
|
||||
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
||||
})}
|
||||
>
|
||||
|
||||
@@ -730,14 +730,15 @@ export class Select implements ComponentInterface {
|
||||
const hasFloatingOrStackedLabel = labelPlacement === 'floating' || labelPlacement === 'stacked';
|
||||
const justifyEnabled = !hasFloatingOrStackedLabel;
|
||||
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline';
|
||||
const inItem = hostContext('ion-item', this.el);
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline' && !inItem;
|
||||
|
||||
return (
|
||||
<Host
|
||||
onClick={this.onClick}
|
||||
class={createColorClasses(this.color, {
|
||||
[mode]: true,
|
||||
'in-item': hostContext('ion-item', el),
|
||||
'in-item': inItem,
|
||||
'select-disabled': disabled,
|
||||
'select-expanded': isExpanded,
|
||||
'has-value': this.hasValue(),
|
||||
|
||||
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 187 KiB After Width: | Height: | Size: 187 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
@@ -8,7 +8,7 @@ import { createLegacyFormController } from '../../utils/forms';
|
||||
import type { Attributes } from '../../utils/helpers';
|
||||
import { inheritAriaAttributes, debounceEvent, findItemLabel, inheritAttributes } from '../../utils/helpers';
|
||||
import { printIonWarning } from '../../utils/logging';
|
||||
import { createColorClasses } from '../../utils/theme';
|
||||
import { createColorClasses, hostContext } from '../../utils/theme';
|
||||
import { getCounterText } from '../input/input.utils';
|
||||
|
||||
/**
|
||||
@@ -603,7 +603,8 @@ For textareas that do not have a visible label, developers should use "aria-labe
|
||||
const { inputId, disabled, fill, shape, labelPlacement } = this;
|
||||
const mode = getIonStylesheet(this);
|
||||
const value = this.getValue();
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline';
|
||||
const inItem = hostContext('ion-item', this.el);
|
||||
const shouldRenderHighlight = mode === 'md' && fill !== 'outline' && !inItem;
|
||||
|
||||
return (
|
||||
<Host
|
||||
|
||||