Gen123
February 28, 2018, 9:16am
1
Hi there,
I’m totally new developing an app with F7 and first of all congratulations for this fantastic job!
I did some research about how to solve the following scenario but I was not able to find the solution.
I have a scenario with 4 pages, 1) Index -> 2) Smart-select -> 3) Virtual list -> 4) Virtual list
Forward process is working perfectly but when I move from 4) to 2) I need that the previous data in 2) stays.
See below the href in page 4).
’’
How could archive that?
Thanks!
There shouldn’t be page after generated page with Smart Select options, Smart Select is designed to be used for select values only. Otherwise, use custom pages with routes instead
Or you can try to enable stackPage
view’s parameter to keep previous pages in DOM
Gen123
February 28, 2018, 3:40pm
4
Hi Vladimir,
Thanks for the reply.
I just tried stackPage without success as per below:
var app = new Framework7({
id: ‘io.framework7.test’,
root: ‘#app ’,
cache: true,
theme: theme,
views:{
stackPages: true,
},
…
Could you please guide me where I can find some code examples about the custom pages with routes?
Many thanks
It must be
view: {
stackPages: true
}
http://framework7.io/docs/routes.html
2 Likes
Gen123
February 28, 2018, 3:59pm
6
thanks. Rectified to:
views:{
stackPages: true
},
but still no success.
I will review now your documentation about routes.
Thanks
Gen123
March 1, 2018, 4:02pm
7
Solution provided thanks to the DanBoschen and adasoft posts.
I have been trying to create a Smart Select with a very large number of items downloaded via JSON, and looking for a good example on how to do this. The following is my best attempt:
> $$.getJSON(siteURL.concat('items'),function(data){
> var virtualList = myApp.virtualList('.smart-select select#listItems',{items: data});
> });
<li>
<a href="#"
class="item-link smart-select"
data-searchbar="true"
data-searchbar-placeholder="Search Items"
data-virtual-list = …
Thanks again.