diff --git a/tgui/packages/tgui/components/Dropdown.tsx b/tgui/packages/tgui/components/Dropdown.tsx index ba1815249ae..98e533d9ed9 100644 --- a/tgui/packages/tgui/components/Dropdown.tsx +++ b/tgui/packages/tgui/components/Dropdown.tsx @@ -69,20 +69,16 @@ export class Dropdown extends Component { Dropdown.currentOpenMenu?.getBoundingClientRect() ?? NULL_RECT, }; menuContents: any; - handleClick: any; state: DropdownState = { open: false, + selected: this.props.selected, }; - constructor() { - super(); - - this.handleClick = () => { - if (this.state.open) { - this.setOpen(false); - } - }; - } + handleClick = () => { + if (this.state.open) { + this.setOpen(false); + } + }; getDOMNode() { return findDOMfromVNode(this.$LI, true); @@ -170,7 +166,10 @@ export class Dropdown extends Component { return (
{ this.setSelected(value); }}> diff --git a/tgui/packages/tgui/styles/components/Dropdown.scss b/tgui/packages/tgui/styles/components/Dropdown.scss index a04913a61c9..78c7f7a5986 100644 --- a/tgui/packages/tgui/styles/components/Dropdown.scss +++ b/tgui/packages/tgui/styles/components/Dropdown.scss @@ -51,6 +51,11 @@ line-height: base.em(17px); transition: background-color 100ms ease-out; + &.selected { + background-color: rgba(255, 255, 255, 0.5) !important; + transition: background-color 0ms; + } + &:hover { background-color: rgba(255, 255, 255, 0.2); transition: background-color 0ms;