Skip to content

Commit 2b3e239

Browse files
authored
Merge branch 'master' into mpopov/calendar/refactoring
2 parents bec5659 + 43c98cc commit 2b3e239

File tree

7 files changed

+77
-5
lines changed

7 files changed

+77
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [6.3.4] - 2025-10-22
8+
### Fixed
9+
- #### Date picker
10+
- Issues when clearing the value and notch border in Material theme [#1894](https://github.com/IgniteUI/igniteui-webcomponents/pull/1894)
11+
- #### Textarea
12+
- Stale internal input reference when switching between themes
13+
714
## [6.3.3] - 2025-10-14
815
### Fixed
916
- #### Chat
@@ -1043,6 +1050,7 @@ Initial release of Ignite UI Web Components
10431050
- Ripple component
10441051
- Switch component
10451052

1053+
[6.3.4]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.3...6.3.4
10461054
[6.3.3]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.2...6.3.3
10471055
[6.3.2]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.1...6.3.2
10481056
[6.3.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/6.3.0...6.3.1

package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/combo/combo.spec.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,36 @@ describe('Combo', () => {
445445
});
446446
});
447447

448+
it('should hide the clear button when disableClear is true', async () => {
449+
combo.select();
450+
await elementUpdated(combo);
451+
452+
let button = combo.shadowRoot!.querySelector('[part="clear-icon"]');
453+
expect(button).to.exist;
454+
expect(button?.hasAttribute('hidden')).to.be.false;
455+
456+
combo.disableClear = true;
457+
await elementUpdated(combo);
458+
459+
button = combo.shadowRoot!.querySelector('[part="clear-icon"]');
460+
expect(button?.hasAttribute('hidden')).to.be.true;
461+
});
462+
463+
it('should show the clear button when disableClear is false', async () => {
464+
combo.disableClear = true;
465+
combo.select();
466+
await elementUpdated(combo);
467+
468+
let button = combo.shadowRoot!.querySelector('[part="clear-icon"]');
469+
expect(button?.hasAttribute('hidden')).to.be.true;
470+
471+
combo.disableClear = false;
472+
await elementUpdated(combo);
473+
474+
button = combo.shadowRoot!.querySelector('[part="clear-icon"]');
475+
expect(button?.hasAttribute('hidden')).to.be.false;
476+
});
477+
448478
it('should toggle case sensitivity by pressing on the case sensitive icon', async () => {
449479
const button = combo.shadowRoot!.querySelector(
450480
'[part~="case-icon"]'

src/components/combo/combo.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ export default class IgcComboComponent<
441441
return this._disableFiltering;
442442
}
443443

444+
/**
445+
* Hides the clear button.
446+
* @attr disable-clear
447+
* @default false
448+
*/
449+
@property({ type: Boolean, attribute: 'disable-clear' })
450+
public disableClear = false;
451+
444452
/* blazorSuppress */
445453
/**
446454
* The template used for the content of each combo item.
@@ -933,7 +941,7 @@ export default class IgcComboComponent<
933941
slot="suffix"
934942
part="clear-icon"
935943
@click=${this.handleClearIconClick}
936-
?hidden=${this._selection.isEmpty}
944+
?hidden=${this.disableClear || this._selection.isEmpty}
937945
>
938946
<slot name="clear-icon">
939947
<igc-icon

src/components/textarea/textarea.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,21 @@ describe('Textarea component', () => {
149149
expect(prefixPart.hidden).to.be.true;
150150
expect(suffixPart.hidden).to.be.true;
151151
});
152+
153+
it('correctly recreates internal input query after re-renders', async () => {
154+
element = await fixture(html`<igc-textarea></igc-textarea>`);
155+
textArea = element.renderRoot.querySelector('textarea')!;
156+
157+
// Switching to material creates a new internal template with another textarea...
158+
configureTheme('material');
159+
await elementUpdated(element);
160+
161+
// ..thus the previously referenced non-material textarea should not match the internal query
162+
expect(textArea !== (element as any)._input).to.be.true;
163+
164+
configureTheme('bootstrap');
165+
await elementUpdated(element);
166+
});
152167
});
153168

154169
describe('Events', () => {

src/components/textarea/textarea.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default class IgcTextareaComponent extends FormAssociatedRequiredMixin(
111111
onChange: this._handleSlotChange,
112112
});
113113

114-
@query('textarea', true)
114+
@query('textarea')
115115
private readonly _input!: HTMLTextAreaElement;
116116

117117
protected override get __validators() {

stories/combo.stories.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ const metadata: Meta<IgcComboComponent> = {
134134
control: 'boolean',
135135
table: { defaultValue: { summary: 'false' } },
136136
},
137+
disableClear: {
138+
type: 'boolean',
139+
description: 'Hides the clear button.',
140+
control: 'boolean',
141+
table: { defaultValue: { summary: 'false' } },
142+
},
137143
required: {
138144
type: 'boolean',
139145
description:
@@ -168,6 +174,7 @@ const metadata: Meta<IgcComboComponent> = {
168174
groupSorting: 'asc',
169175
caseSensitiveIcon: false,
170176
disableFiltering: false,
177+
disableClear: false,
171178
required: false,
172179
disabled: false,
173180
invalid: false,
@@ -207,6 +214,8 @@ interface IgcComboArgs {
207214
caseSensitiveIcon: boolean;
208215
/** Disables the filtering of the list of options. */
209216
disableFiltering: boolean;
217+
/** Hides the clear button. */
218+
disableClear: boolean;
210219
/** When set, makes the component a required field for validation. */
211220
required: boolean;
212221
/** The name attribute of the control. */
@@ -323,6 +332,7 @@ export const Default: Story = {
323332
.groupSorting=${args.groupSorting}
324333
?case-sensitive-icon=${args.caseSensitiveIcon}
325334
?disable-filtering=${args.disableFiltering}
335+
?disable-clear=${args.disableClear}
326336
?open=${args.open}
327337
?autofocus=${args.autofocus}
328338
?autofocus-list=${args.autofocusList}

0 commit comments

Comments
 (0)