Hi Nook
Because you using a component.form with a component.number-field you need to add the style: isDisabled: true to allow the formatting of the number. You also need to remove signDisplay: always otherwise you will get a + in front of the number. Let me know if this works for you. You can also see this information in the following topic jc-number-field in the developer reference section on the documentation.
To expand on what @LeeG has posted.
Here are 2 examples of adding currency into a jig.
One method using a component.entity with an entity-field and one using a component.form with a number-field (similar to your scenario on top)
A few things to take note of. In both cases you will see we use numberStyle: currency to define the number style, as well as then specifying the currency: USD
This will pass the USD symbol in front of the number.
datasources:
contructionCostsMny:
type: datasource.static
options:
data:
- value: 7550000
children:
- type: component.entity
options:
children:
- type: component.entity-field
options:
label: Construction Costs - Entity field
value:
text: =@ctx.datasources.contructionCostsMny.value
format:
numberStyle: currency
currency: USD
- type: component.form
instanceId: test
options:
children:
- type: component.number-field
instanceId: contructionCostsMny
options:
icon: currency-dollar-circle
label: Construction Costs - Form number field
style:
isDisabled: true
format:
numberStyle: currency
currency: USD
value: =@ctx.datasources.contructionCostsMny.value
Hi Nook,
I have passed the request on to our development team.
Currently I dont think this is possible to add formatting like this on input focus like you have shown above.
I will reach out once I have feedback on this.