From 9ecb704e1087aee9a91d3d93335b5b77da1ef39c Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Tue, 14 Jan 2020 13:28:53 -0500 Subject: [PATCH] fix prettier issues --- awx/ui_next/src/components/Search/Search.jsx | 152 +++++++++--------- .../InventoryGroups/InventoryGroupsList.jsx | 6 +- awx/ui_next/src/types.js | 4 +- 3 files changed, 82 insertions(+), 80 deletions(-) diff --git a/awx/ui_next/src/components/Search/Search.jsx b/awx/ui_next/src/components/Search/Search.jsx index 9edc19dda7..6413bfe785 100644 --- a/awx/ui_next/src/components/Search/Search.jsx +++ b/awx/ui_next/src/components/Search/Search.jsx @@ -210,83 +210,85 @@ class Search extends React.Component { {searchColumnName} )} - {columns.map(({ key, name, options, isBoolean, booleanLabels = {} }) => ( - { - onRemove(chipsByKey[key].key, val); - }} - categoryName={chipsByKey[key] ? chipsByKey[key].label : key} - key={key} - showToolbarItem={searchKey === key} - > - {(options && ( - - - - )) || - (isBoolean && ( - - )) || ( - - {/* TODO: add support for dates: - qsConfig.dateFields.filter(field => field === key).length && "date" */} - field === searchKey - ) && - 'number') || - 'search' + {columns.map( + ({ key, name, options, isBoolean, booleanLabels = {} }) => ( + { + onRemove(chipsByKey[key].key, val); + }} + categoryName={chipsByKey[key] ? chipsByKey[key].label : key} + key={key} + showToolbarItem={searchKey === key} + > + {(options && ( + + + + )) || + (isBoolean && ( + + )) || ( + + {/* TODO: add support for dates: + qsConfig.dateFields.filter(field => field === key).length && "date" */} + field === searchKey + ) && + 'number') || + 'search' + } + aria-label={i18n._(t`Search text input`)} + value={searchValue} + onChange={this.handleSearchInputChange} + onKeyDown={this.handleTextKeyDown} + /> + + + )} + + ) + )} ); } diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx index cd0139ff04..a60c16c973 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.jsx @@ -188,9 +188,9 @@ function InventoryGroupsList({ i18n, location, match }) { key: 'parents__isnull', isBoolean: true, booleanLabels: { - "true": i18n._(t`Show Only Root Groups`), - "false": i18n._(t`Show All Groups`) - } + true: i18n._(t`Show Only Root Groups`), + false: i18n._(t`Show All Groups`), + }, }, { name: i18n._(t`Created By (Username)`), diff --git a/awx/ui_next/src/types.js b/awx/ui_next/src/types.js index 586ca80ca4..1c072c8383 100644 --- a/awx/ui_next/src/types.js +++ b/awx/ui_next/src/types.js @@ -258,8 +258,8 @@ export const SearchColumns = arrayOf( isDefault: bool, isBoolean: bool, booleanLabels: shape({ - "true": string.isRequired, - "false": string.isRequired + true: string.isRequired, + false: string.isRequired, }), options: arrayOf(arrayOf(string, string)), })