]> git.proxmox.com Git - proxmox-widget-toolkit.git/commit
object grid: allow one to declaratively specify rows
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 May 2021 14:39:23 +0000 (16:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 21 May 2021 15:15:03 +0000 (17:15 +0200)
commitbc9ae6029f30742e345f95cbaf7521d95dfaa00e
tree8ffa498919b43df2aad9639a263e773fc3aadc61
parentf0f898d2dd5da5970f15cec6a19e5b6665a6fffb
object grid: allow one to declaratively specify rows

So that users of this component do not necesacrrily need to add an
initComponent override and make the `me.add_XYZ_row()` there, but
instead can use something like:

  gridRows: [
    {
      xtype: 'text',
      name: 'http-proxy',
      text: gettext('HTTP proxy'),
      defaultValue: Proxmox.Utils.noneText,
      vtype: 'HttpProxy',
      deleteEmpty: true,
    },
  ],

I avoid using `rows` as config key as that is internally used for
quite a few things, and potentially some existing users (did not
checked all). We can still switch to that easily if it is deemed to
be better...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/grid/ObjectGrid.js