Add placeholder text when user selects a fuzzy search on labels

This commit is contained in:
Marliana Lara
2022-04-05 12:56:40 -04:00
parent bea924ddc6
commit 51b5b78084

View File

@@ -195,6 +195,11 @@ function AdvancedSearch({
}; };
const renderTextInput = () => { const renderTextInput = () => {
let placeholderText;
if (keySelection === 'labels' && lookupSelection === 'search') {
placeholderText = 'e.g. label_1,label_2';
}
if (isTextInputDisabled) { if (isTextInputDisabled) {
return ( return (
<Tooltip <Tooltip
@@ -222,6 +227,7 @@ function AdvancedSearch({
value={(!keySelection && t`First, select a key`) || searchValue} value={(!keySelection && t`First, select a key`) || searchValue}
onChange={setSearchValue} onChange={setSearchValue}
onKeyDown={handleAdvancedTextKeyDown} onKeyDown={handleAdvancedTextKeyDown}
placeholder={placeholderText}
/> />
); );
}; };