简体   繁体   中英

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

I have a List with Objects and I want to have the selection carry the complete Objects. Property selection does not work

how can i do this?

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

thanks

Selection should be based on the id field. When you need to access the record, you should find it the array. Alternatively, you can create a computable , like in the example:

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

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