Replies: 2 comments
-
Instead you'd need to be able to call Locally you can try copying the augment module to try out some changes Then adding this to line 215 to be def _wrap_js_event(handler):
def wrapper(e):
handler(original_event=e)
return wrapper
Then in your handler def my_data_grid_click_handler(self, **event_args):
original_event = event_args["original_event"]
original_event.stopPropagation() # stop this event from propagating
# original_event.stopImmediatePropagation() # might be required try this if the above doesnt work
... # rest of function If that works we can look to merge it upstream |
Beta Was this translation helpful? Give feedback.
-
Hi Stu, So I am giving up with managing the pagination events. Instead I created a little I will publish this little class in the forum in a few days, after a little real world testing. |
Beta Was this translation helpful? Give feedback.
-
I have a problem with the
data_grid.set_event_handler('pagination_click', self.pagination_click)
.I am able to get my handler to run, but I can't prevent the default one from running.
I would like to
e.preventDefault()
, so I can add items to the list when we are approaching the end before showing the next page.I tried to
return True
on my event handler, but didn't help. My handler runs and the page is loaded anyway.Any idea about how to get
e.preventDefault()
to work, or something equivalent?Beta Was this translation helpful? Give feedback.
All reactions