Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Combo defaultValue doesn't work after data set (e.g. from async request) #1554

Open
damyanpetev opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1555
Open

[Bug]: Combo defaultValue doesn't work after data set (e.g. from async request) #1554

damyanpetev opened this issue Jan 23, 2025 · 0 comments · May be fixed by #1555
Assignees

Comments

@damyanpetev
Copy link
Member

Which component(s) are affected?

Combo

Description

When the Combo data is set after the initial update of the component (e.g. from async request), the defaultValue isn't reflected due to the data setter re-assigning value which takes the component out of pristine state.

There's possibly more to be done regarding

Reproduction

combo_defaultValue.zip

Run the attached sample and select and order from the side combo to populate the form. Combo reflects the default value only after reset.
OR
In on any Combo - set data and then defaultValue after, e.g. on https://igniteui.github.io/igniteui-webcomponents/?path=/story/combo--form

$0.data = $0.data;
$0.defaultValue = [$0.defaultValue.at(0)]

Workaround

None

Is this a regression?

No or unsure. This never worker, or I haven't tried before.

Affected versions

5.2.1

Browser/OS/Node environment

Browser: Chromium/Chrome/132.0.0.0
OS: Windows

@damyanpetev damyanpetev added 🆕 status: new The issue is new and will be reviewed when somebody picks it up. bug Something isn't working combo labels Jan 23, 2025
@damyanpetev damyanpetev self-assigned this Jan 23, 2025
@damyanpetev damyanpetev added 🛠️ status: in-development and removed 🆕 status: new The issue is new and will be reviewed when somebody picks it up. labels Jan 23, 2025
@damyanpetev damyanpetev linked a pull request Jan 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant