Skip to content

Commit

Permalink
fix: Disable filtering on wide result sets (#18021)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter committed Jan 13, 2022
1 parent 14b9298 commit 343d3f8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions superset-frontend/src/SqlLab/components/ResultSet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ import { SaveDatasetModal } from 'src/SqlLab/components/SaveDatasetModal';
import { UserWithPermissionsAndRoles } from 'src/types/bootstrapTypes';
import ProgressBar from 'src/components/ProgressBar';
import Loading from 'src/components/Loading';
import FilterableTable from 'src/components/FilterableTable/FilterableTable';
import FilterableTable, {
MAX_COLUMNS_FOR_TABLE,
} from 'src/components/FilterableTable/FilterableTable';
import CopyToClipboard from 'src/components/CopyToClipboard';
import { prepareCopyToClipboardTabularData } from 'src/utils/common';
import { exploreChart } from 'src/explore/exploreUtils';
Expand Down Expand Up @@ -560,7 +562,12 @@ export default class ResultSet extends React.PureComponent<
onChange={this.changeSearch}
value={this.state.searchText}
className="form-control input-sm"
placeholder={t('Filter results')}
disabled={columns.length > MAX_COLUMNS_FOR_TABLE}
placeholder={
columns.length > MAX_COLUMNS_FOR_TABLE
? t('Too many columns to filter')
: t('Filter results')
}
/>
)}
</ResultSetControls>
Expand Down

0 comments on commit 343d3f8

Please sign in to comment.