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

please move mouseDown event to host #1821

Open
steve3d opened this issue Dec 4, 2020 · 3 comments
Open

please move mouseDown event to host #1821

steve3d opened this issue Dec 4, 2020 · 3 comments

Comments

@steve3d
Copy link

steve3d commented Dec 4, 2020

Is your feature request related to a problem? Please describe.
I see in source here:

(mousedown)="handleMousedown($event)"

the mousedown event is bind to ng-select-container's div, but if I want to make some style change, like add padding to ng-select's element, then when click on the padding space won't open the dropdown, but if handleMousedown is a HostListener then there will be no problem, it will work better than before.

Describe the solution you'd like
make handleMousedown a HostListener instead of listen to the inner div.

Describe alternatives you've considered
seems there is no alternative way when add padding to ng-select element.

@varnastadeus
Copy link
Member

Seems wrong that clicking on an empty space should open a dropdown 🤔

@steve3d
Copy link
Author

steve3d commented Jan 8, 2021

截屏2021-01-08 12 03 22

well, how about this kind of design? I have padding under ng-select, the .ng-container is in side the padding.

current design only opens when clicking the container, but is has a padding, click on padding won't open the dropdown.

If i set margin to ng-container then I have to set border-radius to every thing inside.

@no-response no-response bot removed the needs reproduction needs reproducible example label Jan 8, 2021
@steve3d
Copy link
Author

steve3d commented Jan 8, 2021

截屏2021-01-08 12 07 54

rendering result.

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

No branches or pull requests

2 participants