-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dropdown 下拉菜单] 添加菜单展开/收起的回调 #2989
Comments
👋 @jrainlau,感谢给 TDesign 提出了 issue。 |
加个 interface Props {
onTrigger?: (action: 'show' | 'hide') => void
} |
|
不好,和一般的常见语义冲突了。这里没有 value 的,来个这个给我看第一眼的话很奇怪,像是什么受控属性了。 不过这么一说或许可以加 |
如果一定要加的话 建议就和select一样暴露一个onPopupVisibleChange,不过现在的popupProps透传事件也可以满足这个需求,就是多了一层 |
那回头要加的话按照统一的规则来吧。@jrainlau 你可以先使用上面说的 popupProps 来解决你现在的问题。 |
* feat(breadcrumb): add tooltipprops re #2989 * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
好的,感谢~!
YiJie ***@***.***> 于2024年7月11日周四 16:33写道:
… 如果一定要加的话
建议就和select一样暴露一个onPopupVisibleChange,不过现在的popupProps透传事件也可以满足这个需求,就是多了一层
***@***.*** <https://github.com/jrainlau> 你可以先使用上面说的
popupProps 来解决你现在的问题。
—
Reply to this email directly, view it on GitHub
<#2989 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC434RAAKN5YI7645VBKCPDZLY7OPAVCNFSM6AAAAABKWLJI62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRSGM2DOMZXGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
这个功能解决了什么问题
在自定义下拉框内容的场景中,很多时候需要知晓菜单的展开/收起时机,以便实现对应的逻辑。举个例子:
类似这种菜单的功能,为了优化性能,我希望在完成全部的勾选项,关闭菜单后,才触发一次后台请求。现在没有展开/收起的回调,我只能操作一个就往后台发一次请求。
你建议的方案是什么
给 添加
onShow
和onHide
回调,分别在展示菜单、关闭菜单时触发。The text was updated successfully, but these errors were encountered: