Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Apr 12, 2023
1 parent 8da28e5 commit afc4510
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ export default function DrillByModal({
const [currentColumn, setCurrentColumn] = useState(column);
const [currentFormData, setCurrentFormData] = useState(formData);
const [currentFilters, setCurrentFilters] = useState(filters);
const [usedGroupbyColumns, setUsedGroupbyColumns] = useState([column]);
const [usedGroupbyColumns, setUsedGroupbyColumns] = useState([
...ensureIsArray(formData[groupbyFieldName]).map(colName =>
dataset.columns?.find(col => col.column_name === colName),
),
column,
]);

const updatedFormData = useMemo(() => {
let updatedFormData = { ...currentFormData };
Expand Down
2 changes: 2 additions & 0 deletions superset-frontend/src/components/Chart/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { Column } from '@superset-ui/core';

export enum DrillByType {
Chart,
Expand All @@ -39,4 +40,5 @@ export type Dataset = {
first_name: string;
last_name: string;
}[];
columns?: Column[];
};

0 comments on commit afc4510

Please sign in to comment.