Override the Property Grid Component
Survey Creator consists of individual UI components that you can override to extend their functionality or implement custom appearance. Overriding the Property Grid component is useful if you want to add UI elements around it, without customizing the Property Grid itself. For instance, this demo shows how to display custom buttons above the Property Grid.
The steps to override a SurveyJS component depend on the frontend framework you use. The following instructions outline the core stages:
Create a custom component.
This component will extend the Property Grid functionality.Make the original Property Grid component available within the custom component.
In React, importPropertyGridComponent
within the custom component.
In Vue 3, register the original component using theapp.component()
method (see themain.ts
file).
In Angular and vanilla JS applications, the original component is available by default.Implement desired functionality in the custom component.
The component's markup should include the original Property Grid component.Replace the original component with the custom component.
Register the custom component under the name"svc-property-grid"
withinComponentFactory
(in Vue 3),ReactElementFactory
(in React and vanilla JS), orAngularComponentFactory
(in Angular).
Refer to the Code tab for details and code examples.