You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.
What happened?
When using <IxSelect> with dynamically populated nested <IxSelectItem>'s, the initial value (using value prop) is not selected correctly.
When using the deprecated selectedIndices prop, the initial value is shown correctly.
This must have something to do with the change detection when IxSelectItems are changed dynamically after the parent IxSelect has been rendered.
This bug only occurs for dynamic IxSelectItems. For static hard coded values it is working fine.
Please see my stackblitz.
Edit: Seems like when setting the value prop AFTER the items have been initialized it is working.
(e.g. setSelectedValue('2') inside the callback, see example code)
What type of frontend framework are you seeing the problem on?
ok so it seems like the same bug is present with selectedIndizes. But due to the fact that I'm supplying a new array instance on each render, in my example it looks like it's working. Without wrapping the selectedIndizes in a new array each time, the same problem occurs.
Prerequisites
What happened?
When using
<IxSelect>
with dynamically populated nested<IxSelectItem>
's, the initial value (usingvalue
prop) is not selected correctly.When using the deprecated
selectedIndices
prop, the initial value is shown correctly.This must have something to do with the change detection when IxSelectItems are changed dynamically after the parent IxSelect has been rendered.
This bug only occurs for dynamic IxSelectItems. For static hard coded values it is working fine.
Please see my stackblitz.
Edit: Seems like when setting the
value
prop AFTER the items have been initialized it is working.(e.g. setSelectedValue('2') inside the callback, see example code)
What type of frontend framework are you seeing the problem on?
React
Which version of iX do you use?
v2.5.0
Code to produce this issue.
https://stackblitz.com/edit/react-hsbjhb?file=src%2FApp.js
The text was updated successfully, but these errors were encountered: