XTargets.Elmish.Lens
0.0.6
See the version list below for details.
dotnet add package XTargets.Elmish.Lens --version 0.0.6
NuGet\Install-Package XTargets.Elmish.Lens -Version 0.0.6
<PackageReference Include="XTargets.Elmish.Lens" Version="0.0.6" />
paket add XTargets.Elmish.Lens --version 0.0.6
#r "nuget: XTargets.Elmish.Lens, 0.0.6"
// Install XTargets.Elmish.Lens as a Cake Addin #addin nuget:?package=XTargets.Elmish.Lens&version=0.0.6 // Install XTargets.Elmish.Lens as a Cake Tool #tool nuget:?package=XTargets.Elmish.Lens&version=0.0.6
XTargets.Elmish.Lens
A working demo for using a lens with the FuncUI Elmish API for Avalonia rather than the classic elmish messages and commands.
May also work with other Elmish consumers such as Fable?? There is no dependency directly on FUNCUI.
https://github.com/bradphelan/FUNCUI.Samples
It's a master child editor setup. The data model is
Application has_many Companies
Company has_many Employees
The view on the left allows you to select a company. The view on the right allows you to edit the company name and product and also edit ( but not yet add or remove employees )
Troubles I had.
TextBox.OnTextChanged is a PITA. Because it fires when the model is first loaded without user input it often triggers the dispatch loop to keep firing forever. This might have been to due to other bugs I had but OnTextChanged is evil. I now listen specifically for keypresses to ensure that an update is user fired rather that UI fired.
ListBoxes combined with editable TextBoxes don't really work. The list row is not selected as the EditBox doesn't bubble the tap event back to the ListBox. I fought this for a while and gave up. The UI kind of works around the problem. Notice I don't allow editing of company data in the left hand list view as I need the row selection to work but in the right hand view I do allow it for employees because I don't care about the selection.
You should be able to build the app with just
dotnet build
dotnet run
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 is compatible. netcoreapp3.1 was computed. |
-
.NETCoreApp 3.0
- Aether (>= 8.3.1)
- Bogus (>= 29.0.1)
- Elmish (>= 3.0.0)
- FSharp.Core (>= 4.7.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on XTargets.Elmish.Lens:
Package | Downloads |
---|---|
XTargets.FuncUI
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.