Open rohita-personatech opened 3 years ago
One option would be to declare Row C dependent on Row A and in the condition (if you use a function condition) check whether Row B is hidden. Or just replicate the logic to make row C also depend on row A which is not so elegant but will be consistent.
One option would be to declare Row C dependent on Row A and in the condition (if you use a function condition) check whether Row B is hidden. Or just replicate the logic to make row C also depend on row A which is not so elegant but will be consistent.
@mats-claassen Thanks for the reply. As i wanted to implement the dynamic forms C is not aware about the dependancy with A. Is there any way I can achieve this without adding dependancy on A?
I understand. So Eureka currently does not support transitive dependencies and it also only supports "observing" the value
of another row. Having said that, if you use the Condition.function type to calculate whether a row should be hidden or not, you can check whether the other row is hidden or disabled, etc.
So when Row A's value changes, evaluateHidden
gets called only for rows directly dependent on it. I see 2 ways forward for you in this case:
hidden
value of a row changes, you call evaluateHidden
on each of the rows that depend on this row. (See here). This could be implemented in a didSet
of hiddenCache
(See here)thnaks, will try to implement this.
I have a use case where lets say there are 3 rows, A, B and C
When i changed the value in row A which then hides the row B, but as Row C depends on B it should also hide. As Row B is not visible.
Please help me to fix this.