Skip to content

Commit

Permalink
Allow filepicker import into any cell #420 🌿
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Jun 19, 2024
1 parent dcf570a commit 7592669
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@

root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

[*.fs]
fsharp_multiline_bracket_style = stroustrup
fsharp_newline_before_multiline_computation_expression = false
2 changes: 1 addition & 1 deletion src/Client/Pages/ProtocolTemplates/ProtocolState.fs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module Protocol =
let nextState, cmd =
match templates with
| Ok t0 ->
let t = Array.ofSeq t0.Values
let t = Array.ofSeq t0
let nextState = { state with LastUpdated = Some System.DateTime.UtcNow }
nextState, UpdateTemplates t |> ProtocolMsg |> Cmd.ofMsg
| Result.Error e -> state, GenericError (Cmd.none,e) |> DevMsg |> Cmd.ofMsg
Expand Down
4 changes: 3 additions & 1 deletion src/Client/Update/InterfaceUpdate.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ open Elmish
open Model
open Shared
open Fable.Core.JsInterop
open Shared.ARCtrlHelper

module private Helper =
open ExcelJS.Fable.GlobalBindings
Expand Down Expand Up @@ -112,7 +113,8 @@ module Interface =
let mutable rowIndex = rowIndex
let cells = [|
for name in fileNames do
let cell = ARCtrl.CompositeCell.createFreeText name
let c0 = model.SpreadsheetModel.ActiveTable.TryGetCellAt(columnIndex,rowIndex).Value
let cell = c0.UpdateMainField name
(columnIndex, rowIndex), cell
rowIndex <- rowIndex + 1
|]
Expand Down

0 comments on commit 7592669

Please sign in to comment.