diff --git a/src/Explorer/Menus/NotificationConsole/NotificationConsole.less b/src/Explorer/Menus/NotificationConsole/NotificationConsole.less index 570243fc4..2e9413020 100644 --- a/src/Explorer/Menus/NotificationConsole/NotificationConsole.less +++ b/src/Explorer/Menus/NotificationConsole/NotificationConsole.less @@ -99,7 +99,22 @@ .notificationConsoleControls { padding: @MediumSpace; margin-left:@DefaultSpace; + display: flex; + align-items: center; + .ms-Dropdown-container { + display: flex; + .ms-Dropdown-title { + height: 25px; + line-height: 25px; + } + .ms-Dropdown { + min-width: 110px; + margin-left: 10px; + height: 25px; + line-height: 25px; + } + } #consoleFilterLabel { padding: 4px; } @@ -107,6 +122,7 @@ .consoleSplitter { border-left: 1px solid @BaseMedium; margin: @MediumSpace; + height: 20px; } .clearNotificationsButton { diff --git a/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx b/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx index de411f2c4..6f5916e89 100644 --- a/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx +++ b/src/Explorer/Menus/NotificationConsole/NotificationConsoleComponent.tsx @@ -5,7 +5,7 @@ import * as React from "react"; import { ClientDefaults, KeyCodes } from "../../../Common/Constants"; import AnimateHeight from "react-animate-height"; - +import { Dropdown, IDropdownOption } from "office-ui-fabric-react"; import LoadingIcon from "../../../../images/loading.svg"; import ErrorBlackIcon from "../../../../images/error_black.svg"; import infoBubbleIcon from "../../../../images/info-bubble-9x9.svg"; @@ -53,7 +53,12 @@ export class NotificationConsoleComponent extends React.Component< NotificationConsoleComponentState > { private static readonly transitionDurationMs = 200; - private static readonly FilterOptions = ["All", "In Progress", "Info", "Error"]; + private static readonly FilterOptions = [ + { key: "All", text: "All" }, + { key: "In Progress", text: "In progress" }, + { key: "Info", text: "Info" }, + { key: "Error", text: "Error" } + ]; private headerTimeoutId: number; private prevHeaderStatus: string; private consoleHeaderElement: HTMLElement; @@ -62,7 +67,7 @@ export class NotificationConsoleComponent extends React.Component< super(props); this.state = { headerStatus: "", - selectedFilter: NotificationConsoleComponent.FilterOptions[0], + selectedFilter: NotificationConsoleComponent.FilterOptions[0].key || "", isExpanded: props.isConsoleExpanded }; this.prevHeaderStatus = null; @@ -150,20 +155,15 @@ export class NotificationConsoleComponent extends React.Component< >
- - + aria-labelledby="consoleFilterLabel" + aria-label={this.state.selectedFilter} + /> ): void { - this.setState({ selectedFilter: event.target.value }); + private onFilterSelected(event: React.ChangeEvent, option: IDropdownOption): void { + this.setState({ selectedFilter: String(option.key) }); } private getFilteredConsoleData(): ConsoleData[] { diff --git a/src/Explorer/Menus/NotificationConsole/__snapshots__/NotificationConsoleComponent.test.tsx.snap b/src/Explorer/Menus/NotificationConsole/__snapshots__/NotificationConsoleComponent.test.tsx.snap index 51d6908eb..08d3750a3 100644 --- a/src/Explorer/Menus/NotificationConsole/__snapshots__/NotificationConsoleComponent.test.tsx.snap +++ b/src/Explorer/Menus/NotificationConsole/__snapshots__/NotificationConsoleComponent.test.tsx.snap @@ -110,43 +110,34 @@ exports[`NotificationConsoleComponent renders the console (expanded) 1`] = `
- - + selectedKey="All" + />