Skip to content

Commit 998e244

Browse files
committed
FIx easy auto complete
1 parent de161e9 commit 998e244

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/easy-autocomplete.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,23 @@ function init(Survey, $) {
1010
},
1111
isDefaultRender: true,
1212
activatedByChanged: function (activatedBy) {
13-
if (
14-
Survey.JsonObject.metaData.findProperty("text", "choices") !== null ||
15-
Survey.JsonObject.metaData.findProperty("text", "choicesByUrl") !== null
16-
) {
17-
return;
18-
}
19-
Survey.JsonObject.metaData.addProperty("text", {
13+
if (!!Survey.Serializer.findProperty("text", "choices") || !!Survey.Serializer.findProperty("text", "choicesByUrl")) return;
14+
Survey.Serializer.addProperty("text", {
2015
name: "choices:itemvalues",
2116
category: "choices",
2217
categoryIndex: 1,
2318
});
24-
Survey.JsonObject.metaData.addProperty("text", {
19+
Survey.Serializer.addProperty("text", {
2520
name: "choicesByUrl:restfull",
2621
className: "ChoicesRestfull",
2722
category: "choicesByUrl",
2823
visible: false,
2924
categoryIndex: 2,
3025
});
31-
Survey.JsonObject.metaData.addProperty("text", {
26+
Survey.Serializer.addProperty("text", {
3227
name: "config",
3328
category: "general",
34-
default: null,
29+
visible: false,
3530
});
3631
},
3732
afterRender: function (question, el) {
@@ -118,7 +113,7 @@ function init(Survey, $) {
118113
},
119114
};
120115

121-
Survey.CustomWidgetCollection.Instance.addCustomWidget(widget, "type");
116+
Survey.CustomWidgetCollection.Instance.addCustomWidget(widget);
122117
}
123118

124119
if (typeof Survey !== "undefined") {

0 commit comments

Comments
 (0)