Skip to content

Commit

Permalink
[ES|QL][Discover] Show all non-empty values in the grid (elastic#178692)
Browse files Browse the repository at this point in the history
- Followup for elastic#174585

## Summary

This PR hides only `null`, `undefined` values and keeps `false`, `0`,
`(empty)`.

Before:
<img width="500" alt="Screenshot 2024-03-14 at 10 07 13"
src="https://github.com/elastic/kibana/assets/1415710/c5d49362-09e3-48f2-9ecc-247560950d68">

After:
<img width="500" alt="Screenshot 2024-03-14 at 10 06 25"
src="https://github.com/elastic/kibana/assets/1415710/3c1adcfd-bec9-4b4a-b94f-78b1d916e9dd">
  • Loading branch information
jughosta authored Mar 15, 2024
1 parent 232d10a commit 4ae02b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function SourceDocument({
{pairs.map(([fieldDisplayName, value, fieldName]) => {
// temporary solution for text based mode. As there are a lot of unsupported fields we want to
// hide the empty one from the Document view
if (isPlainRecord && fieldName && !row.flattened[fieldName]) return null;
if (isPlainRecord && fieldName && (row.flattened[fieldName] ?? null) === null) return null;
return (
<Fragment key={fieldDisplayName}>
<EuiDescriptionListTitle className="unifiedDataTable__descriptionListTitle">
Expand Down

0 comments on commit 4ae02b0

Please sign in to comment.