Skip to content

DM-9638 Remove unexpected image tab after a column for histogram is selected #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/firefly/js/charts/ui/ColSelectView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function showColSelectPopup(colValStats,onColSelected,popupTitle,buttonTe
columns[3] = {name: 'Description', prefWidth: widths[3], visibility: 'show'};
}

var tableModel = {totalRows: data.length, tbl_id:TBL_ID, tableData: {columns, data }, highlightedRow: hlRowNum};
var tableModel = {totalRows: data.length, tbl_id:TBL_ID, tableData: {columns, data }, highlightedRow: hlRowNum, onlyData: true};

// 360 is the width of table options
const minWidth = Math.max(columns.reduce((rval, c) => isFinite(c.prefWidth) ? rval+c.prefWidth : rval, 0), 360);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {take} from 'redux-saga/effects';
import {filter, isEmpty, get} from 'lodash';

import {LO_VIEW, SHOW_DROPDOWN, SET_LAYOUT_MODE, getLayouInfo, dispatchUpdateLayoutInfo, dropDownHandler} from '../../core/LayoutCntlr.js';
import {findGroupByTblId, getTblIdsByGroup, smartMerge} from '../../tables/TableUtil.js';
import {findGroupByTblId, getTblIdsByGroup, smartMerge, getTblById} from '../../tables/TableUtil.js';
import {TBL_RESULTS_ADDED, TABLE_LOADED, TABLE_REMOVE, TBL_RESULTS_ACTIVE} from '../../tables/TablesCntlr.js';
import {CHART_ADD, CHART_REMOVE} from '../../charts/ChartsCntlr.js';

Expand Down Expand Up @@ -126,10 +126,13 @@ function onAnyAction(layoutInfo, action, views) {
}
return smartMerge(layoutInfo, {showTables, showImages, showXyPlots, autoExpand, mode: {expanded, standard, closeable}});
}


var isOnlyTableData = (id) => (get(getTblById(id), 'onlyData'));

function handleNewTable(layoutInfo, action) {
const {tbl_id} = action.payload;

if (isOnlyTableData(tbl_id)) return layoutInfo;
var {images={}, showImages} = layoutInfo;
var {coverageLockedOn, showFits, showMeta, showCoverage, selectedTab, metaDataTableId} = images;

Expand Down