簡體   English   中英

cxjs如何獲取選擇中的數組或對象的所有鍵?

[英]cxjs how to get all keys of an array or object in the selection?

我有一個包含對象的列表,我希望選擇包含完整的對象。 屬性選擇不起作用

我怎樣才能做到這一點?

...
    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"
                    }}
...

謝謝

選擇應基於id字段。 當您需要訪問記錄時,應該找到它的數組。 另外,您可以創建一個computable ,如示例所示:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM