cxjs如何在选择中获取数组或对象的所有键?

时间:2018-04-26 10:41:11

标签: reactjs grid cxjs

我有一个带对象的列表,我希望选择带有完整的对象。财产选择不起作用

我该怎么做?

...
    records:bind="$myWindow.ObjectList"
    selection={{
                        type: KeySelection,
                        keyFields: ["Name","MyId","otherprops"], <--here i would need all my object properties. but i cannot list a hundret and they may change
                        bind: "$linkWindow.selectedObject"
                    }}
...

感谢

1 个答案:

答案 0 :(得分:0)

选择应基于id字段。当您需要访问记录时,您应该找到它的数组。或者,您可以创建computable,例如:

https://docs.cxjs.io/concepts/controllers#computed-values