Forum Discussion

Master_T's avatar
Master_T
Helper I
4 years ago
Solved

Numeric property in custom visual doesn't work

Hello guys and gals

 

I'm developing a custom visual and I want to have an integer input box for a particular property that can be edited.

So I put this in my capabilities.json:

"objects": {
	"visualSettings":{
		"displayName": "Visual settings",
		"descriptionKey": "visualSettings",
		"properties": {
			"maxFractionDigits":{
				"displayName": "Max fraction digits",
				"displayNameKey": "maxFractionDigits",
				"type": {
					"integer": true
				}
			}
		}
	}
}

 

In my settings objects I have the property defined like this:

public maxFractionDigits: number = 5;

 

However, when the visual properties panel renders the input box does not show up, only the title does, as you can see here:

 

As you can see, I also have a bool and a string property and they render correctly as a toggle switch and a text box. It's just the integer property that doesn't render the editor.

 

What am I doing wrong here?

4 Replies