Skip to content

Commit 8efa931

Browse files
authored
Hide path when in filter modal (#270)
1 parent 28355ba commit 8efa931

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/components/QueryPanel/AddMenu/ValueList.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface FieldListProps {
1919
fieldPath?: string;
2020
ref?: React.RefObject<HTMLDivElement | null>;
2121
customStyle?: StyleXStyles;
22+
showPath?: boolean;
2223
}
2324

2425
export function ValueList({
@@ -27,6 +28,7 @@ export function ValueList({
2728
fieldPath,
2829
ref,
2930
customStyle,
31+
showPath = true,
3032
}: FieldListProps) {
3133
const {searchResults} = useSearch(search, fieldPath);
3234
const stringSearchResults = useMemo(
@@ -51,7 +53,9 @@ export function ValueList({
5153
onClick={() => onClick(value)}
5254
>
5355
<Value value={value} />
54-
<div {...stylex.props(styles.field)}>{value.fieldName}</div>
56+
{showPath ? (
57+
<div {...stylex.props(styles.field)}>{value.fieldName}</div>
58+
) : null}
5559
</div>
5660
))
5761
) : search ? (

src/components/filters/StringFilterCore.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export const StringFilterCore: React.FC<StringFilterCoreProps> = ({
165165
}
166166
}}
167167
customStyle={styles.valueList}
168+
showPath={false}
168169
/>
169170
</div>
170171
</>

0 commit comments

Comments
 (0)