-
-
Notifications
You must be signed in to change notification settings - Fork 876
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
Expose source HTML element for click events #962
Comments
Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider supporting me on Patreon |
This sounds like a reasonable request, I think for maximum flexibility we can just expose a |
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes #962
I just added this in the latest
Then in any click handlers you can do |
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes #962
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes #962
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes #962
Great. Thank you very much for your effort. I will check this ASAP, will be very useful. |
BREAKING CHANGE: the `columnHeaderClicked` output on the month view now exposes an object instead of just the ISO day number Before: ``` columnHeaderClicked="columnHeaderClicked($event)" ``` After: ``` columnHeaderClicked="columnHeaderClicked($event.isoDayNumber)" ``` Closes #962
Is your feature request related to a problem? Please describe
We have built a time reporting component based on your angular calendar package. Our component uses a popover to make possible the time riporting (can be seen on the attached picture below) and the popover itself based on Angular CDK overlay. The popover component uses
flexibleConnectedTo() PositionStrategy
and for the proper alignment of the popup we need to provide the originating element (ElementRef | HTMLElement | Point
) the popover should be snapped to.For this to work we use a hacky solution... setting ids to the hour segments and events based on their timestamp or event id and when one of them clicked we try to parse the time / get the id of the originating event and guess the element. As you can see this one is not the best solution.
Describe the solution you'd like
Currently there are multiple usable events (like dayClicked, eventClicked, eventTimesChanged etc.) which exposes a lot of information but not the originating HTML element itself the action is used on.
So it would be really grate if we could pass the actual element as a parameter.
Describe your use case for implementing this feature
The use case would be the above mentioned improvement, where we could greatly reduce the complexity of the originating element parsing and improve code readability.
Additional context
The text was updated successfully, but these errors were encountered: