I use Fw7 ver 4.5.2 local
I create a dynamic dialog with a select:
$('.mediatek_filter').on('click', function () {
app.dialog.create({
title: 'Фильтр мероприятий',
text: '<div class="row" style="align-items: center;"><div class="col-auto"><div class="list media-list" style="margin: 0;"><ul><li class="item-content item-input"><div class="item-inner"><div class="item-title item-label">Формат мероприятия</div><div class="item-input-wrap input-dropdown-wrap"><select name="selectFilter" placeholder="Выберите формат мероприятия..." readonly="true"><option value="0">Все мероприятия</option><option value="1">Интервью</option><option value="2">Процедура</option><option value="3">Событие</option><option value="4">Интерьер</option><option value="5">Препарат</option></select></div></div></li></ul></div></div></div>',
buttons: [
{
text: 'Отмена',
},
{
text: '<a href="#" dmx-on:click="nameProduct.setValue(selectFilter.value)">Применить</a>',
},
],
on: {
opened: function () {
if (window.dmx && dmx.app) {
dmx.app.$parse(page.el);
dmx.app.$update();
}
}
}
}).open();
});
As you can see from the code, I trigger an event after the dialog openned so that dmx updates the links to the page elements. However, the dynamic event associated with the dialog button does not work.
Variable nameProduct
works correctly. If I use the above code not in a dynamic dialog, but just place it on the page, then everything will work correctly. The problem only occurs when using a dynamic dialog.
What my mistake?
Thank you in advance.
Community Page
Last updated:
Last updated: