Skip to main content

CnRegisterSchemaSelect

Paired Register + Schema dropdowns for the OpenRegister-data-driven dashboard widget forms (stat / delta / gauge / object-list / chart / stats-block).

It self-fetches the available registers and their schemas from OpenRegister (/apps/openregister/api/registers?_extend[]=schemas), so authors pick from a list instead of typing slugs. The schema dropdown is scoped to the selected register's schemas and stays disabled until a register is chosen. Emitted values are the register/schema slugs that the widget renderers and fetchSchemaProperties expect.

Vue 2 .sync-style — it emits update:register / update:schema, so a parent can bind with :register.sync / :schema.sync or explicit handlers:

<CnRegisterSchemaSelect
:register="source.register"
:schema="source.schema"
@update:register="updateSource('register', $event)"
@update:schema="updateSource('schema', $event)" />

Wraps: NcSelect (×2)

Props

PropTypeDefaultDescription
registerString''Currently selected register slug (v-model:register).
schemaString''Currently selected schema slug (v-model:schema). Cleared automatically when register changes.
disabledBooleanfalseDisable both dropdowns.

Events

EventPayloadDescription
update:registerstringThe chosen register slug (or '' when cleared).
update:schemastringThe chosen schema slug (or '' when cleared / on register change).

Props

NameTypeRequiredDefaultDescription
registerstring''Currently selected register slug (v-model:register).
schemastring''Currently selected schema slug (v-model:schema).
disabledbooleanfalseDisable both dropdowns.

Events

NamePayloadDescription
update:register
update:schema
update:register Emitted with the chosen register slug.
update:schema Emitted with the chosen schema slug (cleared on register change).