This is a (multiple allowed):
What you did
I have page_1 wich calls page_2 via a simple href=''
page_2 has an smartselect like this:
<div data-page="comprobantes-cabecera" class="page">
<div class="navbar">
<div class="navbar-inner">
<div class="left"><a href="#" class="back link icon-only"><i class="icon icon-back"></i></a></div>
<div class="center">Datos de la cabecera</div>
</div>
</div>
<div class="page-content">
<form class="list-block inputs-list">
<ul>
<li>
<a href="#" class="item-link smart-select">
<select name="cmb_comprobante_tipo2" id="cmb_comprobante_tipo">
<option value='1'> val 1</option>
<option value='2'> val 2</option>
<option value='3'> val 3</option>
<option value='4'> val 4</option>
</select>
<div class="item-content">
<div class="item-media"><i class="icon material-icons">receipt</i></div>
<div class="item-inner">
<div class="item-title">Tipo de comprobante</div>
<div class="item-after comprobante-tipo-desc">FACTURA C</div></div>
</div>
</a>
</li>
MyApp is defined like this, so when you select in any option, it close the smartselect
var myApp = new Framework7({
pushState: false,
swipePanel: 'left',
material: true,
materialPageLoadDelay:0,
materialRipple:true,
materialPreloaderHtml:true,
precompileTemplates: true,
cache:true,
template7Pages: true, // enable Template7 rendering for Ajax and Dynamic pages
fastClicks:true,
dynamicPageUrl: 'content-{{name}}',
smartSelectBackOnSelect: true,
// ... other parameters
});
BUT, when I click in an option and close the smartselect page, it refresh me page_1 executing the onPageInit method.
I don't know if it's the expected behavior but for me is not. ¿why re-init me the first page?
Expected
ok, it's rare that behavior. Page 1 has nothing to see with that smart-select.
If I need to capture the change of smart-select in page2 to assign that value and work with the result, when the back refresh me page1, it erase the content.
In my case I couldn't use it, and I had to change it to a normal select. Maybe someone happens to.
Could be optional this refresh.
This is unexpected. Page 1 has nothing to do with the smart select on page 2. Please fix this bug,
In all seriousness this is not a bug, it's a feature
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.