Skip to content
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

Bug, Swate: Enable Hiding of Data Property Colums #600

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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/Client/MainComponents/Cells.fs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ type Cell =
| TSR | TAN -> $"{columnType} ({cellValue})"
| _ -> cellValue
let extendableButtonOpt =
if columnType = Main && not header.IsSingleColumn then
if (columnType = Main && not header.IsSingleColumn) || (columnType = Main && header.IsDataColumn) then
extendHeaderButton(state_extend, columnIndex, setState_extend) |> Some
else
None
Expand Down
10 changes: 6 additions & 4 deletions src/Client/MainComponents/SpreadsheetView/ArcTable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let private CreateBodyCells (columnIndex, rowIndex, state:Set<int>, model:Model,
Cell.Empty()
Cell.BodyTSR(index, cell, model, dispatch)
Cell.BodyTAN(index, cell, model, dispatch)
elif header.IsDataColumn then
elif header.IsDataColumn && isExtended then
if cell.isData then
Cell.BodyDataSelector(index, cell, model, dispatch)
Cell.BodyDataFormat(index, cell, model, dispatch)
Expand All @@ -48,9 +48,11 @@ let private CreateHeaderCells(columnIndex, state, setState, model, dispatch) =
Cell.HeaderTSR(columnIndex, header, state, setState, model, dispatch)
Cell.HeaderTAN(columnIndex, header, state, setState, model, dispatch)
elif header.IsDataColumn then
Cell.HeaderDataSelector(columnIndex, header, state, setState, model, dispatch)
Cell.HeaderDataFormat(columnIndex, header, state, setState, model, dispatch)
Cell.HeaderDataSelectorFormat(columnIndex, header, state, setState, model, dispatch)
let isExtended = state.Contains columnIndex
if isExtended then
Cell.HeaderDataSelector(columnIndex, header, state, setState, model, dispatch)
Cell.HeaderDataFormat(columnIndex, header, state, setState, model, dispatch)
Cell.HeaderDataSelectorFormat(columnIndex, header, state, setState, model, dispatch)
else
()
]
Expand Down
3 changes: 1 addition & 2 deletions src/Client/MainComponents/SpreadsheetView/DataMap.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let private CreateBodyCells(columnIndex, rowIndex, state: Set<int>, model, dispa
Cell.Empty()
Cell.BodyTSR(index, cell, model, dispatch)
Cell.BodyTAN(index, cell, model, dispatch)
elif header.IsDataColumn then
elif header.IsDataColumn && isExtended then
if cell.isData then
Cell.BodyDataSelector(index, cell, model, dispatch)
Cell.BodyDataFormat(index, cell, model, dispatch)
Expand All @@ -35,7 +35,6 @@ let private CreateBodyCells(columnIndex, rowIndex, state: Set<int>, model, dispa
Cell.Empty()
Cell.Empty()
Cell.Empty()

]

let private CreateHeaderCells(columnIndex, state, setState, model, dispatch) =
Expand Down
Loading