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

Display a limited number of entries #7

Open
s1lver opened this issue Jul 25, 2018 · 1 comment
Open

Display a limited number of entries #7

s1lver opened this issue Jul 25, 2018 · 1 comment

Comments

@s1lver
Copy link

s1lver commented Jul 25, 2018

Hi! @Faryshta @neverabe
The widget displays the default number of records equal to that set in the inherited "dataProvider". This number is equal to 20.

The solution to the problem is setting the limit while forming the "dataProvider".

new ActiveDataProvider([
    'query' => self::find(),
    'pagination' => [
        'pageSize' => 365,
    ],
])

However, this is not quite the right decision. How much should I set? 365? Then it will be only for a year, and if it is necessary for the previous year, or next year?

Corrections:

  • I suggest or enter a separate parameter for setting the limit.
  • Disable hangout

If necessary I will send pull request.

@Faryshta
Copy link
Member

The limit is for the amount of events you are expecting. If you want to handle a huge amount of events I advice you to combine PJax and this widget to display the results month by month.

If you have another idea do send pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants