Perspective component get dropdown props from gateway

Hi,

I want to create a perspective component with a input_datapoint_id property which a list of items will be provided as dropdown to select a single value.

If my dropdown list is fixed I can do this

{
  "type": "object",
  "additionalProperties": false,
  "required": [],
  "properties": {
    "input_datapoint_id": {
      "type": "string",
      "enum": ["one", "two", "three"],
      "description": "Input datapoint id of production loss",
      "default": "one"
    },
  }
}

However, What if the dropdown list should be generated dynamically (ideally a query to the gateway would work but how can this be done?), will it be possible to have a dynamic dropdown list for the props of a perspective component?

I've never used it, but apparently this exists:

Cool I'll try that out.

How about if I want to get data from the gateway to populate the dropdown within the component.

Is it possible to do an api call to the gateway to get such data?

Seems like an anti-pattern. Components are best when they’re flexible, and making a component do its own queries is at odds with the goals of Ignition. Is there a reason you don’t want to provide your options through a binding?

It's quite a custom component that I am building and I want to abstract away as much things as possible

If you insist.

I’d handle fetching the data in your ComponentModelDelegate and send it the client via an event. You could do this when the delegate starts, on some interval, and/or when the client requests a refresh through a message.