hide column manager by default, style cleenup

This commit is contained in:
Jan Prochazka
2021-11-21 09:16:57 +01:00
parent 30e3295d3e
commit 38db55d5c0
3 changed files with 14 additions and 9 deletions

View File

@@ -4,23 +4,23 @@
export let collapsed;
</script>
<div on:click|stopPropagation class='collapseButtonMarker'>
<div on:click|stopPropagation class="collapseButtonMarker">
<FontIcon icon={collapsed ? 'icon triple-right' : 'icon triple-left'} />
</div>
<style>
div {
position: absolute;
color: var(--theme-font-3);
text-align: center;
/* position: absolute;
left: 0px;
top: 4px;
color: var(--theme-font-3);
background-color: var(--theme-bg-1);
border: 1px solid var(--theme-bg-1);
border: 1px solid var(--theme-bg-1); */
}
div:hover {
color: var(--theme-font-hover);
border: var(--theme-border);
top: 4px;
border: 1px solid var(--theme-font-1);
}
</style>

View File

@@ -98,7 +98,7 @@
setContext('macroValues', macroValues);
let managerSize;
const collapsedLeftColumnStore = writable(getBoolSettingsValue('dataGrid.hideLeftColumn', false));
const collapsedLeftColumnStore = writable(getBoolSettingsValue('dataGrid.hideLeftColumn', true));
$: isFormView = !!(formDisplay && formDisplay.config && formDisplay.config.isFormView);
$: isJsonView = !!config?.isJsonView;

View File

@@ -13,9 +13,14 @@ export function isRegularCell(cell: CellAddress): cell is RegularCellAddress {
return _.isNumber(row) && _.isNumber(col);
}
function normalizeHeaderForSelection(addr: CellAddress): CellAddress {
if (addr[0] == 'filter') return ['header', addr[1]];
return addr;
}
export function getCellRange(a: CellAddress, b: CellAddress): CellAddress[] {
const [rowA, colA] = a;
const [rowB, colB] = b;
const [rowA, colA] = normalizeHeaderForSelection(a);
const [rowB, colB] = normalizeHeaderForSelection(b);
if (_.isNumber(rowA) && _.isNumber(colA) && _.isNumber(rowB) && _.isNumber(colB)) {
const rowMin = Math.min(rowA, rowB);