naive-ui icon indicating copy to clipboard operation
naive-ui copied to clipboard

[Feature Request]: Dropdown support Enter-Key

Open BeanWei opened this issue 1 year ago • 5 comments

This function solves the problem (这个功能解决的问题)

Dropdown only support up/down event, hope to support enter event

Expected API (期望的 API)

dont need add new api, just enhance keybord event

BeanWei avatar Sep 03 '22 23:09 BeanWei

This function solves the problem (这个功能解决的问题)

Dropdown only support up/down event, hope to support enter event

Expected API (期望的 API)

dont need add new api, just enhance keybord event

It's already suppoted. https://github.com/tusen-ai/naive-ui/blob/12178654b2a21f66a4346d5c45b27a7e21958e6a/src/dropdown/src/Dropdown.tsx#L209-L211

Sepush avatar Sep 04 '22 02:09 Sepush

@Sepush 我测试了官网上的demo,这个 enter 的 event 貌似只有当 trigger="hover" 时才会生效

BeanWei avatar Sep 04 '22 04:09 BeanWei

@Sepush can you reopen

BeanWei avatar Sep 06 '22 01:09 BeanWei

没太理解是什么意思,我试了试无论 trigger 是什么这个都可以被触发

07akioni avatar Sep 11 '22 15:09 07akioni

没太理解是什么意思,我试了试无论 trigger 是什么这个都可以被触发

官网多级的那个例子好像不会触发

Sepush avatar Sep 11 '22 15:09 Sepush

这个功能怎么处理?是否支持Enter

wmnv222666 avatar Oct 18 '22 19:10 wmnv222666