From 51a6ba14f10471b3f6d5d60ff3e3a375f942dc48 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Tue, 17 Dec 2019 11:44:35 -0500 Subject: [PATCH] support 1 item in sortColumns --- awx/ui_next/src/components/Sort/Sort.jsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/awx/ui_next/src/components/Sort/Sort.jsx b/awx/ui_next/src/components/Sort/Sort.jsx index fd12908917..9c6c67d49a 100644 --- a/awx/ui_next/src/components/Sort/Sort.jsx +++ b/awx/ui_next/src/components/Sort/Sort.jsx @@ -23,6 +23,15 @@ import { parseQueryString } from '@util/qs'; import { SortColumns, QSConfig } from '@types'; +import styled from 'styled-components'; + +const NoOptionDropdown = styled.div` + align-self: stretch; + border: 1px solid var(--pf-global--BorderColor--300); + padding: 5px 15px; + white-space: nowrap; + border-bottom-color: var(--pf-global--BorderColor--200); +`; class Sort extends React.Component { constructor(props) { @@ -120,9 +129,9 @@ class Sort extends React.Component { return ( - {sortDropdownItems.length > 0 && ( + {sortedColumnName && ( - 0 && ( } dropdownItems={sortDropdownItems} - /> + />) || ( + {sortedColumnName} + )}