•  


feat: add toggle callback to Ellipsis component by damonyoungcc · Pull Request #6576 · ant-design/ant-design-mobile · GitHub
Skip to content
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

feat: add toggle callback to Ellipsis component #6576

Conversation

damonyoungcc
Copy link
Collaborator

@damonyoungcc damonyoungcc commented Mar 21, 2024

close #6570

Copy link
Contributor

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6576.surge.sh

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ?

Project coverage is 92.34%. Comparing base ( 937f845 ) to head ( 04d4353 ) .

Additional details and impacted files
@@           Coverage Diff           @@

#
#           master    #6576   +/-   ##

=======================================
  Coverage   92.34%   92.34%           
=======================================
  Files         318      318           
  Lines        6910     6912    +2     
  Branches     1729     1731    +2     
=======================================
+
 Hits         6381     6383    +2     

  Misses        493      493           
  Partials       36       36           

? View full report in Codecov by Sentry .
?? Have feedback on the report? Share it here .

@damonyoungcc
Copy link
Collaborator Author

?里我只是先?出???一下,感?用toggle??名字不太好

  1. 或者加上受控的方案,用onChange
  2. 或者?考 arco ,增加 onEllipsisNodeClick onCollapseNodeClick

@@ -21,6 +21,10 @@ export type EllipsisProps = {
stopPropagationForActionButtons?: PropagationEvent[]
onContentClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void
defaultExpanded?: boolean
toggle?: (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

Could we use onEllipsis instead. It's same as the antd API:
https://ant.design/components/typography-cn#api

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

Indeed, the design of onEllipsis in antd is more reasonable. The correct logic is to trigger onEllipsis based on whether the text is ellipsized or not. I'll continue working on it.

@zombieJ
Copy link
Member

Why close?

1 similar comment
@zombieJ
Copy link
Member

Why close?

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ellipsis ?件添加展?折?的回?函?
2 participants
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본