Table buttons in lazy loaded tabs losing their actions

Hi,

I am using jmix 2.3.1 , lazy loading tabs in tabsheet where I have normal dataGrid like this:

<hbox classNames="buttons-panel">
    <button id="addBtn" action="dataGrid.add"/>
    <button id="excludeBtn" action="dataGrid.exclude"/>
    <gridColumnVisibility icon="COG" themeNames="icon" dataGrid="dataGrid"/>
</hbox>
<dataGrid id="dataGrid" width="100%" dataContainer="entityDc">
    <actions>
        <action id="add" type="list_add"/>
        <action id="exclude" type="list_exclude" text="msg://removeFromKiosk"/>
    </actions>
    <columns>
        <column property="someProp1"/>
        <column property="someProp2"/>
        ...
    </columns>
</dataGrid>

But buttons look like this:
Screenshot from 2024-08-02 10-57-32

I think that button is missing assigned action, but I can see actions in table on right click. Buttons dont have text, theme and any function. They do nothing on click. Manually created buttons with custom click handler and no action works and looks as expected.

It works when I assign action programmatically.

Is that intended behavior for lazy loaded datagrids?

Thank you,
Jakub

Hi Jakub,

It will be fixed in the next 2.3 patch, see Bind button and grid action when lazy tab is opened · Issue #3423 · jmix-framework/jmix

Regards,
Konstantin

1 Like