-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I created this fiddle. The scenario is like this:
I have a grid with N rows, one of the rows is "selected" and that is showed by the selected radio
put on every row. All the radio
's belong to a single Radiogroup
.
For zk version 9.5.1.3
the statement
radio.setRadiogroup(group);
works just fine and the correct row is selected. However, updating zk to version 9.6.0
or 9.6.0.1
, the same statement causes the Radiogroup
to not have any radio
selected. Is this a bug?
The workaround I'm using right now is by replacing the previous statement with
group.appendChild(radio);
since this one works for all the versions above.
Thanks
Instead of replacing, the second statement should be added, that way the selection would be unique in the group
this is likely a side effect of: ZK-4763
As you can see in the commit it clears the previously assigned group when setting/changing the parent. I assume that's where it happens, I didn't debug through it. Here your updated example, first setting the parent, and then connecting the radio to the radiogroup.
https://zkfiddle.org/sample/32oj09m/2-Radiogroup-possible-bug-workaround#source-1
Asked: 2021-10-13 00:05:23 +0800
Seen: 6 times
Last updated: Oct 13 '21