How to style a PDF form drop-down?

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
8.1.0

Detailed description of issue
I’m trying to find a way to edit the styling (border thickness and color) of a form PDF drop-down field. I’ve tried using this method:

It works great for normal fields, but when I try to edit the border styling of a drop-down, it doesn’t work. Here’s the relevant code I’m using to no effect:

const { Annotations } = instance.Core;
Annotations.WidgetAnnotation.getCustomStyles = widget => {
    if (widget.fieldName === 'building_name_or_location') {
        return {
            'border-color': 'lightgray',
            'border-width': '2px',
            'border-radius': '2px'
        };
    }
};

(It’s definitely finding “building_name_or_location” and entering that if-statement for that field, I checked).

It just ignores this code and keeps the border thick and red, which is the default style. Am I missing something?

Thanks,

Lucas

Any help would be very appreciated.

I figured this out. I used the following:

const { Annotations } = instance.Core;
Annotations.WidgetAnnotation.getCustomStyles = widget => {
    if (widget.fieldName === 'building_name_or_location') {
        widget.getElement().style.border = 'none';
    }
};