Skip to content

Commit

Permalink
Merge pull request #431 from DataRecce/feature/drc-692-bug-histogram-…
Browse files Browse the repository at this point in the history
…diff-would-show-wrong-error-message-if-there

[Bug] Fix histogram diff wrong message
  • Loading branch information
wcchang1115 authored Sep 26, 2024
2 parents 861a21b + 324e2e9 commit d9c6794
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/src/components/histogram/HistogramDiffForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function HistogramDiffForm({
return <Box>Loading...</Box>;
}

if (columns.length === 0 || error) {
if (allColumns.length === 0 || error) {
return (
<Box>
Error: Please provide the &apos;catalog.json&apos; to list column
Expand All @@ -85,7 +85,12 @@ export function HistogramDiffForm({
<FormControl>
<FormLabel>Pick a column to show Histogram Diff</FormLabel>
<Select
placeholder="Select column"
placeholder={
columns.length !== 0
? "Select column"
: "No numeric column is available"
}
isDisabled={columns.length === 0}
value={params?.column_name}
onChange={(e) => {
const columnName = e.target.value;
Expand Down

0 comments on commit d9c6794

Please sign in to comment.