Colours not changing on dropdown

Hi,

I’ve recently noticed the dropdown colours are not changing based on the selected value.

Sample code below.

title: report
type: jig.default
    
datasources:
  answers:
    type: datasource.static
    options:
      data:
        - id: 1
          name: "Yes"
        - id: 2
          name: "No"
        - id: 3
          name: "Maybe"         

children:
  - type: component.form  
    instanceId: frm
    options:      
      children:
        - type: component.dropdown          
          instanceId: hazards
          options:
            color:
              - when: =(@ctx.components.hazards.state.value = "Yes")
                color: color2
              - when: =(@ctx.components.hazards.state.value = "No")
                color: color4
              - when: =(@ctx.components.hazards.state.value = "Maybe")
                color: color7
            label: "Hazards?"
            data: =@ctx.datasources.answers 
            item:              
              type: component.dropdown-item                            
              options:              
                title: =@ctx.current.item.name
                value: =@ctx.current.item.name

Any ideas?

Thanks,
Adam.

Hi @adam

We are investigating the issue and will update you with our findings.

Hi @adam

This issue has been resolved in Jigx version 1.27.10.

Hi,

It seems the issue might be with how the conditional color styling is configured in your dropdown component. Double-check that the conditionals (when clauses) in your color options are correctly evaluating the state value. Ensure that @ctx.components.hazards.state.value correctly reflects the selected value from the dropdown. Also, verify that the color2, color4, and color7 variables are defined and correctly mapped to CSS classes or styles in your environment. Adjusting these elements should help ensure the dropdown colors change based on the selected value as intended.

Thanks