🚨 Announcing Vendure v2 Beta

registerCustomFieldComponent

registerCustomFieldComponent

Deprecated use registerFormInputComponent() in combination with the customField ui config instead.

Registers a custom component to act as the form input control for the given custom field. This should be used in the NgModule providers array of your ui extension module.

Example

@NgModule({
  imports: [SharedModule],
  declarations: [MyCustomFieldControl],
  providers: [
      registerCustomFieldComponent('Product', 'someCustomField', MyCustomFieldControl),
  ],
})
export class MyUiExtensionModule {}

Signature

function registerCustomFieldComponent(entity: CustomFieldEntityName, fieldName: string, component: Type<CustomFieldControl>): FactoryProvider

Parameters

entity

parameter
type:
CustomFieldEntityName

fieldName

parameter
type:
string

component

parameter
type:
Type<CustomFieldControl>