Dropdown for a `belongs_to` relationship in LiveView

Hey guys, I was thinking if there was a better way to have a dropdown to select a category for the expense than preloading all categories in the mount LiveView function. After going through the documentation, I came up with this but I don’t know where to take it further (or if it even is possible). Thanks, Michal

AshPhoenix.Form.for_create(
  Expense,
  :create,
  api: Ledger,
  as: "expense",
  forms: [
    category: [
      type: :single,
      as: "category"
    ]
  ]
)
|> to_form()

You can use nested forms like that, but AshPhoenix.Form won’t help you with filling in the possible values or anything like that. You’re typically stuck with doing it on mount AFAIK.