Hi All,
I am working with a nested Flex Repeater structure in Perspective and need some guidance on the best approach.
Structure
Level 1 - Checkbox Template
- Contains a checkbox and label.
- Parameters:
type(1 = master checkbox, 2 = child checkbox)valueenable
Level 2 - Row Template
- Contains a Flex Repeater that uses the Checkbox Template.
- Example row:
[Master Checkbox] [Child Checkbox] [Child Checkbox]
The logic here is working correctly:
- When the master checkbox (
type=1) is checked, the child checkboxes (type=2) in that row become enabled. - When the master checkbox is unchecked, the child checkboxes become disabled.
Level 3 - Main View
- Contains another Flex Repeater that uses the Row Template.
- Example:
Row 1 -> [Master] [Child] [Child]
Row 2 -> [Master] [Child] [Child]
Row 3 -> [Master] [Child] [Child]
...
Problem
I am currently using system.perspective.sendMessage() and a message handler to enable/disable child checkboxes.
The issue is that when I check the master checkbox in Row 1, the child checkboxes in all rows become enabled.
Example:
Row 1 Master = Checked
-> Row 1 Childs Enabled ✅
-> Row 2 Childs Enabled ❌
-> Row 3 Childs Enabled ❌
Expected Behaviour
If I check the master checkbox in a specific row:
Row 1 Master = Checked
-> Row 1 Childs Enabled ✅
-> Row 2 No Change ✅
-> Row 3 No Change ✅
Likewise:
Row 3 Master = Checked
-> Row 3 Childs Enabled ✅
-> Other Rows No Change ✅
Help me on this case
I would appreciate any examples or best practices for handling row-specific interactions within nested Flex Repeaters.
Thanks!