-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Add keepAlign support #36
Conversation
|
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/react-component/align/qxjhgzjd1 |
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
==========================================
+ Coverage 91.93% 92.48% +0.54%
==========================================
Files 3 3
Lines 124 133 +9
Branches 27 33 +6
==========================================
+ Hits 114 123 +9
Misses 10 10
Continue to review full report at Codecov.
|
|
这个是不是吧 Slider |
|
考虑过,但是如果外部容器是 |
|
|
但是体验会好很多,而且感觉这才是对的,动态更新位置只能算 workaround。 |
|
Sorry. 没看到这个。看看现在的方案:ant-design/ant-design#20699 这个 PR 没用了,Revert 掉。 |
之前为了性能,把每次渲染都同步一次的逻辑去掉了。这导致了
Slider这种利用不断更新达到保持坐标同步的效果失效了。但是变回旧版还是嫌太浪费性能,添加一个keepAlign的属性,额外处理那些需要实时保持同步的组件。rc-trigger也会同步升级一下。ref: ant-design/ant-design#20677