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

Small Change to yii.gridView.js please #20064

Open
stovesy opened this issue Nov 3, 2023 · 2 comments
Open

Small Change to yii.gridView.js please #20064

stovesy opened this issue Nov 3, 2023 · 2 comments

Comments

@stovesy
Copy link

stovesy commented Nov 3, 2023

Would it be possible to alter the above as follows please.

 var event = $.Event(gridEvents.beforeFilter);
  $grid.trigger(event, $form);
  if (event.result === false) {
      return;
  }

  $form.submit();

  $grid.trigger(gridEvents.afterFilter, $form);

Passing the $form object to the events will allow me to access and add additional info for the filter processing

@samdark
Copy link
Member

samdark commented Nov 23, 2023

Yes. Good idea, I think. Do you have some time for a pull request?

@xicond
Copy link
Contributor

xicond commented Jan 5, 2024

I tought, $form already inside $grid, can just acquire by $(this).children('form.gridview-filter-form')

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

3 participants