# \[IGN-3868\] 8.1.3 Perspective Dropdown Style

**URL:** <https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 25, 2021, 4:24am UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889 "2021-03-25T04:24:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam.Bartlett](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@Sam.Bartlett](https://forum.inductiveautomation.com/u/Sam.Bartlett)\
**Post date:** [March 25, 2021, 4:24am UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/1 "2021-03-25T04:24:45Z")

</div>

Has anybody encountered perspective dropdowns not respecting the applied style when the component is not enabled?  
For any element state on the style class the dropdown text will default to a grey color.

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [October 15, 2023, 3:02pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/2 "2023-10-15T15:02:17Z")

</div>

Did you ever find a solution to this problem? I'm having the same issue

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 15, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/3 "2023-10-15T15:12:54Z")

</div>

Could you provide some more insight into the exact setup of your Dropdown? When I apply a color to my Dropdown option text (as well as the color of the Dropdown at `Dropdown.props.style.color`) and then examine the Dropdown and its options while disabled, all styling appears correct.

```auto
[
  {
    "type": "ia.input.dropdown",
    "version": 0,
    "props": {
      "value": "one",
      "options": [
        {
          "value": "one",
          "label": "one"
        },
        {
          "value": "two",
          "label": "two",
          "isDisabled": true
        }
      ],
      "enabled": false,
      "style": {
        "color": "#2EFA2C"
      },
      "dropdownOptionStyle": {
        "fontStyle": "italic",
        "color": "#FB4E4E"
      }
    },
    "meta": {
      "name": "Dropdown"
    },
    "position": {
      "x": 409,
      "y": 48,
      "height": 36,
      "width": 256
    },
    "custom": {}
  }
]

```

Disabled Dropdown:

 ![Screenshot 2023-10-15 at 8.11.11 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa664de3c8a8fb05ebb247b4c1fbc780704635ee.png)

Disabled option:

 ![Screenshot 2023-10-15 at 8.12.03 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/0/e0c5f23ba56443204d1e9ed99de2434d8c141c10.png)

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [November 8, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/4 "2023-11-08T17:19:33Z")

</div>

My options are populated from a named query, so it's just a dataset. I'm using a style class that has a 'disabled' Element State defined, so I would expect that it would use that when the control is disabled.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 8, 2023, 6:20pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/5 "2023-11-08T18:20:24Z")

</div>

Ah, I don't that's going to work because of how CSS determines whether something is "enabled". I'm pretty sure "enabled" is something that only `<input>` elements emit and/or are checked against, and so styling based on enabled state would only be applied to the input of the Dropdown; as the options are `<div>` elements, they would be ignored.

Modify your Dataset used to populate the options to have three columns: `label`, `value`, and `isDisabled` (case-sensitive). As soon as I created a Dataset with this shape I got the desired behavior. The `B` option is disabled - it's just very subtle.

 ![Screenshot 2023-11-08 at 10.19.08 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3dbaf1f59fd23ec90a36d2678ccb465a0b5a0248.png)

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [November 8, 2023, 6:45pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/6 "2023-11-08T18:45:47Z")

</div>

That's what I figured but thanks for confirming. I can do some scripting on the dataset change to build the options dictionary the way you show it.

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [November 8, 2023, 7:37pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/7 "2023-11-08T19:37:38Z")

</div>

Ok, I made the code changes to set the options as an array and it does not do what I want. I think that maybe I didn't do a good job describing my problem.  
The issue I have is that when the component is disabled, it does not follow the 'disabled' Element State option set in the style class as the other controls do. For example:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/c/cc83b0abaaaa6b7aba0d31ac4a9c219e3ef11db6.png)  
I want a disabled dropdown to display light text on a dark background (see SAP Formula Id). With the same style class selected, I get black text on a dark background (Active Recipes).

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 8, 2023, 9:01pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/8 "2023-11-08T21:01:18Z")

</div>

Ah, the Dropdown itself has a longstanding issue with how it applies style classes. I'll make a note on the ticket that it continues to be a problem.

---

<div class="post-metadata">

**Author:** ![naturesbeast](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@naturesbeast](https://forum.inductiveautomation.com/u/naturesbeast)\
**Post date:** [November 8, 2023, 9:02pm UTC](https://forum.inductiveautomation.com/t/ign-3868-8-1-3-perspective-dropdown-style/44889/9 "2023-11-08T21:02:32Z")

</div>

Thanks! I appreciate your help
