简体   繁体   中英

ExtJS 6 plugin.rowwidget Get binded record upon row body component creation

I have a grid with Ext.grid.plugin.RowWidget . When I expand row I have to load some data via ajax using row record data as request parameters and display loaded data in a row body component.

How I can get row record data upon row body component creation? I've tried initComponent and afterrender listener, but I understand that it is not appropriate place because data is not binded yet. I have to listen for another event or?

Here is simple fiddle illustrating my problem and what I've tried already.

Thanks to Evan Trimboli, onWidgetAttach seems to work:

        plugins: [{
            ptype: 'rowwidget',
            widget: {
                xtype: 'characterPanel',
                bind: {
                    characterName: '{record.name}'
                },
            },
            onWidgetAttach: function (plugin, bodyComponent, record) {
                // Do stuff
            }
        }],

Check updated fiddle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM