-
Notifications
You must be signed in to change notification settings - Fork 0
ListPopup
Eric edited this page Oct 9, 2024
·
17 revisions
ListPopup is a component to render extended content into a
Popup
from a click of an item from aDynamicList
.
const listpopup = new OGX.ListPopup({
list: _INSTANCE_OF_DYNAMIC_LIST_,
parent: _OPTIONAL_PARENT_UXI_,
mode: 'auto',
content: _CONTENT_TO_RENDER_,
render_mode: _INT_
});
Ignored if
list
is set. If set, the component is added as a child of declared parentUxi
.
Defaults to
auto
which handles the list selection. Set it tomanual
to call theopen
method when desired instead.
ListPopup offers different render modes, so you can adjust depending on the complexity of what you are rendering
0 : The content is rendered at the same time that the Popup opens, can be laggy with complex OML
1 : The content is rendered once the Popup has opened, while the initial DynamicList item is shrinking
2 : The content is rendered once the Popup has opened and after the DynamicList item has shrunk
Get the instance of
DynamicList
const list = listpopup.list();
Set the instance of
DynamicList
listpopup.list(_DYNAMIC_LIST_INSTANCE_);
Set the content as OML to be displayed
listpopup.content(_CONTENT_);
Example
listpopup.content({
oml: {'default:Views.MyView':{
template: 'MyView',
data : {...}
}}
});
Call this method to open the desired list element. This is only relevant in
manual
mode
listpopup.open(_LIST_ITEM_, _LIST_ELEMENT_);