-
Notifications
You must be signed in to change notification settings - Fork 427
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
wrong event args signature in grid.onClick observable handler #967
Comments
The 2nd argument of Lines 173 to 185 in 28198a8
So I still don't see what the problem is, please provide a repro or print screens to display the problem because I don't see what the problem is. It's possible that I misunderstood original author's intention but please prove me wrong by providing more tangible info. |
actually I think I understand now and I've opened PR #969 to address this |
Glad to read this. |
actually I can do even better and also infer type on |
that's great. |
Describe the bug
the typescript signature of onClick event handler passes an argument fields which is of type Slick.OnClickEventArgs. However the real object passed in is a DOM event, which has the structure reported in the example below:
NB=[I think the argument passed to the event handler should be SlickEventData<ArgType = any>]
NB=[I suspect even other grid onclick handlers has the same mismatch]
SlickEventData {event: PointerEvent, args: {…}, _isPropagationStopped: false, _isImmediatePropagationStopped: false, _isDefaultPrevented: false, …} _isDefaultPrevented: false _isImmediatePropagationStopped: false _isPropagationStopped: false altKey: false args: {row: 1, cell: 0, grid: ExtSlickGrid} arguments_: {row: 1, cell: 0, grid: ExtSlickGrid} bubbles: true clientX: 208 clientY: 142 ctrlKey: false event: PointerEvent {isTrusted: true, pointerId: 1, width: 1, height: 1, pressure: 0, …} key: undefined keyCode: undefined metaKey: false nativeEvent: PointerEvent {isTrusted: true, pointerId: 1, width: 1, height: 1, pressure: 0, …} offsetX: 96 offsetY: 6 pageX: 208 pageY: 142 returnValue: undefined returnValues: (0) [] shiftKey: false target: div.slick-cell.l0.r0.selected type: 'click' which: 1 x: 208 y: 142
Reproduction
does not apply
Which Framework are you using?
Vanilla / Plain JS
Environment Info
Validations
The text was updated successfully, but these errors were encountered: