Skip to content

Commit

Permalink
get rid of the console log
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Jan 29, 2024
1 parent db67d56 commit 6cbe177
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ export const DataGridTable = ({
];
}, []);

console.log('sortOrders', sortingColumns);

const legacyDiscoverTable = useMemo(
() => (
<LegacyDiscoverTable
Expand All @@ -163,15 +161,15 @@ export const DataGridTable = ({
),
[
displayedTableColumns,
dataGridTableColumnsVisibility,
leadingControlColumns,
pagination,
renderCellValue,
rowCount,
sorting,
isToolbarVisible,
rowHeightsOptions,
adjustedColumns,
indexPattern,
onAddColumn,
onColumnSort,
onFilter,
onRemoveColumn,
onReorderColumn,
rows,
sortingColumns,
]
);

Expand Down Expand Up @@ -204,7 +202,6 @@ export const DataGridTable = ({
]
);

console.log('adjustColumns higher level', adjustedColumns);
return (
<DiscoverGridContextProvider
value={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const LegacyDiscoverTable = ({
onFilter,
onClose,
}: DefaultDiscoverTableProps) => {
// console.log("sorting", sorting)
return (
indexPattern && (
<table data-test-subj="docTable" className="osd-table table">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ interface Props {
onChangeSortOrder?: (cols: EuiDataGridSorting['columns']) => void;
onMoveColumn?: (name: string, index: number) => void;
onRemoveColumn?: (name: string) => void;
sortOrder: {
sortOrder: Array<{
id: string;
direction: "desc" | "asc";
}[];
direction: 'desc' | 'asc';
}>;
}

export function TableHeader({
Expand All @@ -45,9 +45,6 @@ export function TableHeader({
onRemoveColumn,
sortOrder,
}: Props) {
// const displayedColumns = getDisplayedColumns(columns, indexPattern, hideTimeColumn, isShortDots);
// console.log('displayedTableColumns', displayedTableColumns);

const timeColName = indexPattern.timeFieldName;
return (
<tr data-test-subj="docTableHeader" className="osdDocTableHeader">
Expand Down Expand Up @@ -78,7 +75,7 @@ export function TableHeader({
name={col.display as string}
sortOrder={
sortOrder.length ? sortOrder : []
//getDefaultSort(indexPattern, defaultSortOrder).map(([id, direction]) => ({ id, direction }))
// getDefaultSort(indexPattern, defaultSortOrder).map(([id, direction]) => ({ id, direction }))
}
onReorderColumn={onReorderColumn}
onRemoveColumn={onRemoveColumn}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ export function DocViewTable({
const toggleColumn =
onRemoveColumn && onAddColumn && Array.isArray(columns)
? () => {
console.log('columns', columns);
console.log('field', field);
if (columns.includes(field)) {
onRemoveColumn(field);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const DiscoverTable = ({ rows }: Props) => {

const onSetColumns = (cols: string[]) => dispatch(setColumns({ columns: cols }));
const onSetSort = (s: SortOrder[]) => {
console.log('sorting now!');
dispatch(setSort(s));
refetch$.next();
};
Expand Down

0 comments on commit 6cbe177

Please sign in to comment.