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

GridView::FILTER_TIME #21

Closed
pavlinter opened this Issue Apr 21, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@pavlinter

pavlinter commented Apr 21, 2014

When set GridView::FILTER_TIME, page reload (infinite loop)

            [
                'attribute' => 'end_time',
                'filterType'=>GridView::FILTER_TIME,
                'filterWidgetOptions' => [
                    'pluginOptions' => [
                        'defaultTime'=>false,
                        'showMeridian' => false,
                        'minuteStep' => 30,
                    ],
                ],

            ],
@kartik-v

This comment has been minimized.

Show comment
Hide comment
@kartik-v

kartik-v Apr 21, 2014

Owner

The problem as I checked occurs because of the following:

  1. the base timepicker jquery plugin actually triggers an input update/change event on INIT
  2. the above in turn triggers the Grid Filter change event to refresh the page and then the step number 1 is again called and thus this goes into an infinite loop.

This needs some change in the core bootstrap-timepicker plugin where it MUST NOT TRIGGER a change event on INIT. There is an issue recorded for this as well. Will need to wait till the plugin author would rectify this. I will wait for this and if it takes time, will figure out to fork and correct this. Till then I suggest NOT to use the TimePicker as a filter for your grid and use other alternatives.

Owner

kartik-v commented Apr 21, 2014

The problem as I checked occurs because of the following:

  1. the base timepicker jquery plugin actually triggers an input update/change event on INIT
  2. the above in turn triggers the Grid Filter change event to refresh the page and then the step number 1 is again called and thus this goes into an infinite loop.

This needs some change in the core bootstrap-timepicker plugin where it MUST NOT TRIGGER a change event on INIT. There is an issue recorded for this as well. Will need to wait till the plugin author would rectify this. I will wait for this and if it takes time, will figure out to fork and correct this. Till then I suggest NOT to use the TimePicker as a filter for your grid and use other alternatives.

@kartik-v

This comment has been minimized.

Show comment
Hide comment
@kartik-v

kartik-v May 15, 2014

Owner

Marking temporarily as won't fix... because the plugin author is not committed on this change yet.

Owner

kartik-v commented May 15, 2014

Marking temporarily as won't fix... because the plugin author is not committed on this change yet.

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