surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.01k stars 780 forks source link

add showInToolbox parameter into registerElement function #8383

Closed andrewtelnov closed 2 weeks ago

andrewtelnov commented 3 weeks ago

If there is a need to add a new question type for internal needs that you don't need to see in the Creator Toolbox, then you have to define all items for Toolbox to make sure this new question type is not in the Toolbox. To avoid it a third parameter, showInToolbox, into the registerElement function is added. public registerElement(elementType: string, elementCreator: (name: string) => IElement, showInToolbox: boolean = true): void;