How to let "dir" be inherited? #1405
-
|
A few Radix primitives accept I wonder if that is a good default considering direction could be set on a parent or root and allowed to be inherited? Currently, I'm handling it this way: {/* @ts-ignore: Null is required to make it inherit direction from root */}
<RadioGroup.Root dir="null" />Is there a better way that I'm missing? Or should at least the typings allow |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
Hey @nayaabkhan, as it stands (in the latest public stable versions) those primitives are actually able to react to changes in inherited However, this behaviour has caused a lot of people to complain about performance issues (#749) with the watching of inherited Hope that helps ✌️ |
Beta Was this translation helpful? Give feedback.
Hey @nayaabkhan, as it stands (in the latest public stable versions) those primitives are actually able to react to changes in inherited
dirif you do not give it adirprop.However, this behaviour has caused a lot of people to complain about performance issues (#749) with the watching of inherited
dir. So we have changed the approach recently (#1119) where there will be no explicit watching anymore, but rather be a Provider based approach. So you'll be able to provide thedirhigher up to the whole tree, or some subtree, and all primitives underneath will react accordingly.Hope that helps
✌️