Skip to content
Developerhome

childGetCollection

  Less than to read

Summary

The childGetCollection method retrieves a collection of child objects associated with a parent screen. It allows you to fetch and display multiple child objects, typically in a grid or list format, within the parent screen’s interface.

When calling the “childGetCollection” function, you provide the necessary parameters, including the source object (parent object), the key representing the collection of related items, and the prefix to separate the data in the Redux store. The function then sends a request to the API endpoint and retrieves the collection of items associated with the specified parent object.

childGetCollection Parameters

Parameters Description
source Specifies the object node within the parent screen where the child objects are located (Item or Collection).
key The key under which the collection will be stored in the Redux store.
prefix (Optional) A prefix to separate the data in the Redux store.

childGetCollection Example

"childGetCollection": {
    "prefix": "myGridPrefix",
    "source": {
      "get": {
        "state": "suppliers"
      }
    },
  "key": "suppliers"
}