Skip to content

Commit 1d71471

Browse files
committed
Fix color array trait definition
1 parent 74ee528 commit 1d71471

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/scripts/prop-types.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ _.extend(Color.prototype, BaseType.prototype, {
242242
});
243243

244244
function ColorArray(defaultValue) {
245-
this.defaultValue = defaultValue || "#ffffff";
245+
this.defaultValue = defaultValue || ["#ffffff"];
246246
}
247247
_.extend(ColorArray.prototype, BaseType.prototype, {
248248
getTraitlet: function() {
249-
return 'List(trait=List()).tag(sync=True)';
249+
return `List(trait=Unicode(), default_value=${this.getPythonDefaultValue()}).tag(sync=True)`;
250250
},
251251
getPropertyConverterFn: function() {
252252
return 'convertColorArray';

0 commit comments

Comments
 (0)