Skip to content

Commit

Permalink
Improve type safety and type inference of wrapper
Browse files Browse the repository at this point in the history
Ensures that all props for a single column def assume the same
underlying value. This means that it's not possible to mix and match
types (which would be a bug), and means that the complier can infer
types for you (meaning fewer type annotations).
  • Loading branch information
mattgallagher92 committed Jun 28, 2024
1 parent 2eb5cac commit 56db3fc
Show file tree
Hide file tree
Showing 2 changed files with 726 additions and 723 deletions.
3 changes: 1 addition & 2 deletions demo/src/Components.fs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ let Demo () =
| [| d; m; y |] -> DateTime(int y, int m, int d)
| _ -> DateTime.MinValue)
ColumnDef.valueFormatter (fun valueParams ->
let date: DateTime = valueParams.value
date.ToShortDateString())
valueParams.value.ToShortDateString())
]
ColumnDef.create [
ColumnDef.filter RowFilter.Text
Expand Down
Loading

0 comments on commit 56db3fc

Please sign in to comment.