Skip to content

Commit 4feaae1

Browse files
authored
Merge branch 'master' into rkaraivanov/combo-navigation-refactor
2 parents 1134bdb + ea4e682 commit 4feaae1

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ 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-
## Unreleased
7+
## [5.2.1] - 2025-01-23
88
### Added
99
- #### Dialog
1010
- A new `message` slot that renders text content inside the dialog component has been added. The enhancement was introduced to align the design behavior between Ignite UI for WC and Ignite UI for Angular, ensuring a consistent user experience across products. The newly added `message' slot comes with additional styling with a max-width of 40 characters. The default slot is also still available for rendering content inside the dialog without limiting the component's width.
1111

1212
### Fixed
13+
- #### List
14+
- CSS variables are correctly consumed from internal schemas [#1538](https://github.com/IgniteUI/igniteui-webcomponents/pull/1538)
1315
- #### Rating
1416
- Inaccurate value calculation on selection when step is set to 1 [#1548](https://github.com/IgniteUI/igniteui-webcomponents/issues/1548)
1517

@@ -670,6 +672,7 @@ Initial release of Ignite UI Web Components
670672
- Ripple component
671673
- Switch component
672674

675+
[5.2.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/5.2.0...5.2.1
673676
[5.2.0]: https://github.com/IgniteUI/igniteui-webcomponents/compare/5.1.2...5.2.0
674677
[5.1.2]: https://github.com/IgniteUI/igniteui-webcomponents/compare/5.1.1...5.1.2
675678
[5.1.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/5.1.0...5.1.1

src/components/combo/combo.spec.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,45 @@ describe('Combo', () => {
14191419
});
14201420
});
14211421

1422+
describe('Form integration with delayed data', () => {
1423+
const spec = createFormAssociatedTestBed<IgcComboComponent<City>>(html`
1424+
<igc-combo name="combo" value-key="id" display-key="name"></igc-combo>
1425+
`);
1426+
1427+
function initDataDefaultValue(single = false) {
1428+
spec.element.singleSelect = single;
1429+
// assign data after init to simulate async data
1430+
spec.element.data = cities;
1431+
spec.element.defaultValue = value;
1432+
}
1433+
1434+
beforeEach(async () => {
1435+
await spec.setup(IgcComboComponent.tagName);
1436+
});
1437+
1438+
it('correct initial state (single)', () => {
1439+
initDataDefaultValue(true);
1440+
spec.assertIsPristine();
1441+
expect(spec.element.value).to.eql([first(value)]);
1442+
});
1443+
1444+
it('correct initial state (multiple)', () => {
1445+
initDataDefaultValue();
1446+
spec.assertIsPristine();
1447+
expect(spec.element.value).to.eql(value);
1448+
});
1449+
1450+
it('is correctly submitted (single)', () => {
1451+
initDataDefaultValue(true);
1452+
spec.assertSubmitHasValue(first(value));
1453+
});
1454+
1455+
it('is correctly submitted (multiple)', () => {
1456+
initDataDefaultValue();
1457+
spec.assertSubmitHasValues(value);
1458+
});
1459+
});
1460+
14221461
describe('Validation', () => {
14231462
const spec = createFormAssociatedTestBed<IgcComboComponent<City>>(html`
14241463
<igc-combo

src/components/combo/combo.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,13 @@ export default class IgcComboComponent<
182182
/* treatAsRef */
183183
@property({ attribute: false })
184184
public set data(value: T[]) {
185+
if (this._data === value) {
186+
return;
187+
}
185188
this._data = asArray(value);
189+
const pristine = this._pristine;
186190
this.value = asArray(this.value);
191+
this._pristine = pristine;
187192
this._state.runPipeline();
188193
}
189194

0 commit comments

Comments
 (0)