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.21k stars 814 forks source link

Add refuse and don't know items into select base (checkobox, dropdown, radiogroup and tagbox) #7754

Closed andrewtelnov closed 9 months ago

andrewtelnov commented 9 months ago

We need an optional two more items that will work similar to none: showRefuseItem and showDonotKnowItem. These properties should be invisible by default. To enable this functionality in Creator you will need to make this properties visible as the following:

import { Serializer } from "survey-core";

Serializer.findProperty("selectbase", "showRefuseItem").visible = true;
Serializer.findProperty("selectbase", "showDontKnowItem").visible = true;
SamMousa commented 9 months ago

Really nice that this feature landed. I'm a bit stumped that you didn't go for a generic solution that I've already proposed years ago: https://github.com/surveyjs/survey-library/issues/4778

While a great improvement, this approach of having 1000s of options vs a few generic ones seems bad for everyone: more work for you, fewer use cases for us! Anyway, cheers for adding this!