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

Load previous items not working #110

Open
vifus opened this issue Jan 12, 2021 · 1 comment
Open

Load previous items not working #110

vifus opened this issue Jan 12, 2021 · 1 comment

Comments

@vifus
Copy link

vifus commented Jan 12, 2021

When I scroll down list of products (on mobile) for example to second page and I enter to product from second page next I back to products list (URL: products?page=3&per-page=12) and i have products only from second page. I need show button "Load previous items". What Im doing wrong?

my code

	$this->widget['data']['dataProvider'] = [
		'dataProvider' => $dataProvider,
		'itemView' => $this->widget['itemView'] ?: $itemView,
		'summary' => '',
		'layout' => isset($this->widget['layout']) ? $this->widget['layout'] : "{summary}\n{items}\n{pager}" ,
		'itemOptions' => ['class' => $this->widget['itemClass']],
		'options' => ['class' => 'productsList'],
		'emptyText' => $this->widget['data']['emptyText'],
		'emptyTextOptions' => ['class' => 'col-xs-12 margin-bottom text-center emptySearch'],
		'pager' => !isset($this->widget['pager']) ? [
			'class' => \kop\y2sp\ScrollPager::className(),
			'container' => isset($this->widget['pagerconf']['container']) ? $this->widget['pagerconf']['container'] : '.productsList',
			'item' => isset($this->widget['pagerconf']['item']) ? $this->widget['pagerconf']['item'] : '.gridItem',
			'pagination' => isset($this->widget['pagerconf']['pagination']) ? $this->widget['pagerconf']['pagination'] : '',
			'spinnerTemplate' => '<div class="ias-spinner"></div>',
			'enabledExtensions' => isset($this->widget['pagerconf']['enabledExtensions']) ? $this->widget['pagerconf']['enabledExtensions'] :  [
				//IASTriggerExtension,
				//IASSpinnerExtension,
				\kop\y2sp\ScrollPager::EXTENSION_TRIGGER,
				\kop\y2sp\ScrollPager::EXTENSION_SPINNER,
				\kop\y2sp\ScrollPager::EXTENSION_NONE_LEFT,
				\kop\y2sp\ScrollPager::EXTENSION_PAGING,
				\kop\y2sp\ScrollPager::EXTENSION_HISTORY,
			],
		] : false,
	];`

`

@Daizygod
Copy link

same problem, in README texted for attribute "historyPrev" - "Make sure there is only one element that matches the selector.", but it not help

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