Giter VIP home page Giter VIP logo

aaltuj / vxformgenerator Goto Github PK

View Code? Open in Web Editor NEW
115.0 17.0 37.0 1.79 MB

The library contains a component, that nests itself into the Blazor EditForm instead of a wrapper around the EditForm. The component is able to generate a form based on a POCO or a ExpandoObject. Because of this architecture the library provides the developer flexibility and direct usage of the EditForm.

License: MIT License

HTML 9.93% C# 82.95% CSS 5.91% JavaScript 0.33% Batchfile 0.82% Shell 0.07%
blazor form-generator poco blazor-editform editform webassembly wasm

vxformgenerator's Introduction

VxFormGenerator

The library contains a component, that nests itself into the Blazor EditForm instead of a wrapper around the EditForm. The component is able to generate a form based on a POCO or a ExpandoObject. Because of this architecture the library provides the developer flexibility and direct usage of the EditForm.

TLDR

Turns an annotated object....

public class FeedingSession
{
    [Display(Name = "Kind of food")]
    public FoodKind KindOfFood { get; set; }

    [Display(Name = "Note")]
    [MinLength(5)]
    public string Note { get; set; }
    
    [Display(Name = "Amount")]
    public decimal Amount { get; set; }
    
    [Display(Name = "Start")]
    public DateTime Start { get; set; }
    
    [Display(Name = "End")]
    public DateTime End { get; set; }
    
    [Display(Name = "Throwing up")]
    public bool ThrowingUp { get; set; }

    [Display(Name = "Throwing up dict")]
    public ValueReferences<FoodKind> ThrowingUpDict { get; set; } = new ValueReferences<FoodKind>();
    
    [Display(Name = "Color")]
    public VxColor Color { get; set; }
}

... into a nice Blazor form:

A nice form!

Setup

Add the NuGet package.

Open a terminal in the project folder where you want to add the VxFormGenerator. Pick one of the options below:

Plain components

The unstyled version of the input components for the VxFormGenerator

dotnet add package VxFormGenerator.Components.Plain

Bootstrap components

The assumption made by the library is that you already added Bootstrap (4.5.0 and up) setup in your Blazor app

The Bootstrap styled form components for the VxFormGenerator

dotnet add package VxFormGenerator.Components.Bootstrap

Initialize

Open the Startup.cs and add one of the following usage statements:

Plain components

using VxFormGenerator.Settings.Plain;

Bootstrap components

using VxFormGenerator.Settings.Bootstrap;

After adding one of the usage statements add the line services.AddVxFormGenerator(); like shown here below.

public IConfiguration Configuration { get; }

// This method gets called by the runtime. 
// Use this method to add services to the container.
// For more information on how to configure your application, 
// visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
	services.AddRazorPages();
	services.AddServerSideBlazor();
	services.AddVxFormGenerator();
}

Model based

You can have a model that renders inputs for the properties. All that's required is adding a RenderFormElements component to the EditForm. The inputs can be validated by the attached Data Annotations on the property. Just add the built-in DataAnnotationsValidator component.

@page "/"

@using VxFormGenerator.Core
@using FormGeneratorDemo.Data
@using System.Dynamic

<EditForm Model="Model" 
		  OnValidSubmit="HandleValidSubmit"
		  OnInvalidSubmit="HandleInValidSubmit">
    <DataAnnotationsValidator></DataAnnotationsValidator>
    <RenderFormElements></RenderFormElements>		
    <button class="btn btn-primary" type="submit">Submit</button>
</EditForm>

@code{

    /// <summary>
    /// Model that is used for the form
    /// </summary>
    private FeedingSession Model = new FeedingSession();

    /// <summary>
    /// Will handle the submit action of the form
    /// </summary>
    /// <param name="context">The model with values as entered in the form</param>
    private void HandleValidSubmit(EditContext context)
    {
        // save your changes
    }

    private void HandleInValidSubmit(VEditContext context)
    {
        // Do something
    }

}

Dynamic based

You can render a form that is based on a dynamic ExpandoObject. The developer is that able to create a model based at runtime. All that's required is adding a RenderFormElements component to the EditForm. The inputs can NOT YET be validated by Data Annotations. This is a feature yet to be completed.

@page "/"

@using VxFormGenerator.Core
@using FormGeneratorDemo.Data
@using System.Dynamic

<EditForm Model="Model" 
		  OnValidSubmit="HandleValidSubmit"
		  OnInvalidSubmit="HandleInValidSubmit">
    <DataAnnotationsValidator></DataAnnotationsValidator>
    <RenderFormElements></RenderFormElements>		
    <button class="btn btn-primary" type="submit">Submit</button>
</EditForm>

@code{

    /// <summary>
    /// Model that is used for the form
    /// </summary>
    private dynamic Model = new ExpandoObject();

	/// <summary>
	/// Create a dynamic object 
	/// </summary>
    protected override void OnInitialized()
    {
        var dict = (IDictionary<String, Object>) Model;
        dict.Add("Name", "add");
        dict.Add("Note", "This is a note");
        dict.Add("Date", DateTime.Now);
        dict.Add("Amount", 1);
    }

    /// <summary>
    /// Will handle the submit action of the form
    /// </summary>
    /// <param name="context">The model with values as entered in the form</param>
    private void HandleValidSubmit(EditContext context)
    {
        // save your changes
    }

    private void HandleInValidSubmit(VEditContext context)
    {
        // Do something
    }

}

Layout

The form generator supports layout structuring based on meta-data defined at model level.

        // Add label to row 2
    [VxFormRowLayout(Id = 2, Label = "Adress")]
    public class AddressViewModel
    {
        [Display(Name = "Firstname")]
        // Add element to row 1 with automatic width based on number of items in a row
        [VxFormElementLayout(RowId = 1)]
        public string SurName { get; set; }
        // Add element to row 1 with automatic width based on number of items in a row and define a placeholder
        [VxFormElementLayout(RowId = 1, Placeholder = "Your Lastname")]
        [Display(Name = "Lastname")]
        public string LastName { get; set; }

        [Display(Name = "Street")]
        // Add element to row 2 and set the width to 9 of 12 columns
        [VxFormElementLayout(RowId = 2, ColSpan = 9)]
        [MinLength(5)]
        public string Street { get; set; }

        [Display(Name = "Number")]
        // Add element to row 2 and set the width to 3 of 12 columns
        [VxFormElementLayout(RowId = 2, ColSpan = 3)]
        public string Number { get; set; }

        [Display(Name = "Country"),
         // Show Placeholder
         VxFormElementLayout(Placeholder = "The country you live")]
        public string Country { get; set; }

        [Display(Name = "State")]
        [MinLength(5)]
        public string State { get; set; }

    }

Another nice form!

There is also support for nested models.

  public class OrderViewModel
    {
         // Indicate that this property type should be rendered as a separate elements in the form and give it a label
        [VxFormGroup(Label = "Delivery")]
        // Use this to valdidate a complex object
        [ValidateComplexType]
        public AddressViewModel Address { get; set; } = new AddressViewModel();

        // Indicate that this property type should be rendered as a separate elements in the form and give it a label
        [VxFormGroup(Label = "Invoice")]
        // Use this to valdidate a complex object
        [ValidateComplexType]
        public AddressViewModel BillingAddress { get; set; } = new AddressViewModel();

        [Display(Name = "Send insured")]
        public bool Valid { get; set; } = true;

        [Display(Name = "What color box")]
        public VxColor Color { get; set; }
    }
    }

Another Another nice form!

Layout options

The form support multiple rendering options:

Set options Global

  public void ConfigureServices(IServiceCollection services)
        {
            services.AddRazorPages();
            services.AddServerSideBlazor();
            services.AddVxFormGenerator(new VxFormLayoutOptions() { LabelOrientation = LabelOrientation.TOP });
        }

Set options at Component level, these options override the global one.

 <RenderFormElements FormLayoutOptions="@OptionsForForm"></RenderFormElements>

@code{
    private VxFormLayoutOptions OptionsForForm = new VxFormLayoutOptions();
}

Possible options

Set the label position for the form

Label position: Top | Left | None

Set the placeholder policy for the form

Placeholder Policy: Explicit | Implicit | None | ExplicitFallbackToLabels | ImplicitFallbackToLabels

Set the trigger for showing validation state

Validation Policy: OnlyValid | OnlyInvalid | BothValidAndInvalid

Run demo

Run the demo so you can see the options and effects interactively:

  1. git clone https://github.com/Aaltuj/VxFormGenerator.git
  2. cd VxFormGenerator
  3. run.cmd on Windows or bash run.sh on Linux/Mac
  4. navigate to http://localhost:5000/definition-form

Apply your own styling

This is a work in progress

Contact

Discord Server

vxformgenerator's People

Contributors

aaltuj avatar atrejoe avatar bramnauta avatar markjackmilian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vxformgenerator's Issues

Looking for some new fields to Add

Hello,

Thank you for this great Tutorial, I have been working on this for while. It's great to see many people working on this.

However, I am trying to add some new controls (input fields), but I am having difficulties as below:

  1. TextArea input field
  2. Multi Select Dropdown
  3. File Upload
  4. Multi Page Form

Note: I wonder how to create POCO from database such as one database table has some columns like Column Name, DataType, Caption, Values , etc.

Image 1

Response will be greatfull...!!

Hide Control or group of controls dinamycally

Is it possible to hide a control (or a group of control) based on a value of a EditForm element ?
For example, imagine you have a form with a Combobox with values "Person", "Company".
If the user selects "Person", I have to show fields Firstname/Lastname whereas if user selects "Company" I have to show just "CompanyName".

thanks

@bind not valid attribute

I am trying out the Nuget 0.11 version and it is showing the label and laying out the grid just fine, but the control is not shown and the below error is generated in the output window. I am using .NET 5.

System.AggregateException: One or more errors occurred. (InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '@Bind' is not a valid attribute name.)
---> System.InvalidOperationException: InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '@Bind' is not a valid attribute name.
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)

LICENSE

Put a license on your project, there are loads of people that wont even get in a 10 mile radius of an unlicensed project on github

Add support for .NET Standard

This is excellent work!

Would it be possible to add support for .NET Standard? If so we could potentially use this for Blazor WASM projects as well. I took a stab at it and was able to get it to work. Here is a link my repository. I basically copied your code and simply created .NET Standard Razor Library. It works just fine within a Blazor WASM project as well as Blazor Server project.

Also would you be able to shed some light on how to implement a different type of InputText if a POCO property were to be decorated with a DataType of Password or Email?

[DataType(DataType.Password)] public string Password { get; set; }

Also would it possible for me to help you by building out other frameworks such as Bulma or Material? I think once the Layout feature is implemented this would be an amazing next step to get other CSS frameworks working with the core library.

Multi line input

Hi everyone,

Thanks a bunch for the project, it looks extremely promising and useful!

Is there a way to render a multi line input field for long text? Like a blog post content for example.

Also what would be the best way to set custom editor for a field? For example, if I have one of those fancy auto-completing input fields like the Gmail "To" field that gives you an "x" button besides the recipients once you've selected one, how would I annotate the ViewModel's Recipients field?

Thanks a bunch!

ExpandoObject does not render

Hi Alex,
I can't figure out why but the ExpandoObject in the demo does not render.
I tried to updat ethe project (and all packages) to .net 6 but still no luck.
With the /develop branch I had the same result.
image

I would much appreciate any help or pointers on what I could try, the ExpandoObject is something that I could definitely use.

Thanks and best regards!

Leveraging Description Attribute in Enums

If an Enum uses the Description attribute could we control the text displayed in the dropdowns and multiple checkboxes?

Below is an example of what I mean.

public enum FuelType
{
    [Description("Bituminous Coal")] bit,
    [Description("Home Heating and Diesel Fuel (Distillate)")] dfo,
    [Description("Jet Fuel")] jf,
    [Description("Kerosene")] ker,
    [Description("Lignite Coal")] lig,
    [Description("Municipal Solid Waste")] msw,
    [Description("Natural Gas")] ng,
    [Description("Petroleum Coke")] pc,
    [Description("Propane Gas")] pg,
    [Description("Residual Fuel Oil")] rfo,
    [Description("Subbituminous Coal")] sub,
    [Description("Tire -Derived Fuel")] tdf,
    [Description("Waste Oil")] wo
}

Generated forms are not ADA compliant

I was playing with your library and realized that generated forms have labels that are not tied to the corresponding input controls through IDs. This results in screen readers not finding the information to read out to the disabled users.

Allow for layout definitions to structure the input components

Hi , nice start ๐Ÿ‘

i am thinking we may add some layout to the dynamic form , we can pass another 'schema' object to RenderFormElements class that render the elements in some layout, or we can define some new attributes tag onto the POCO.

how do you think ? dude ๐Ÿ’ฏ

Custom attributes on model to facilitate conditional display of entry fields

There are cases where we only display field Foo if the user enters value x into field Bar.

The most common example is probably a dropdown with an "other" selection that causes an additional text input to be displayed.

If #29 were implemented, I could achieve this behavior by manipulating the generated form. But the requirement is so common that specifying the conditional display logic using custom attributes on the model would be ideal.

Dynamic Form Demo work with .Net 6

I am unable to make the library work with .Net6

Model based forms work as expected.

  1. git clone repo
  2. update the project solutions to target .net 6

in addition
a) fork repo
b) use new blazor template with VS2022
c) add in the model based form - works as expected
d) add in the dynamic based form - fails as before

Allow for lookup defintions for a property

Requirements:

At the moment the generator supports only enums as a list. this needs to be extended with the following data types:

  • IEnumerator<>
  • Dictionary<bool, string>
  • Dictonary<bool, object> (Adds expression to the lookup, (object x)=> x.Name)

Solution:

Create an attribute that tells the generator to get the values;

[VxLookup(Expression, Name)]

Add more specific datatype and more to the property.

Let's have a discussion about the road to get to the kind of functionality as requested in issue #7 .

Also would you be able to shed some light on how to implement a different type of InputText if a POCO property were to be decorated with a DataType of Password or Email?

[DataType(DataType.Password)] public string Password { get; set; }

Instead of heaving a lot of Attributes to check when rendering maybe there should be only a couple of them tailored for the VxFomGenerator. This allows for a clearer overview of the possible options provided by the generator.

// PSUEDO CODE

VxFormField(
{
 DataType: DataType.Password,
 Label: "Label of the field" 
}
)

Any other ideas?

DynamicForm.razor show nothing

After run this project, in /dynamic-form, I didn't see any Form Element. Then I check the source, found 2 TODO: EXPANDO SWITCH. One is in

public class VxFormDefinition : Attribute
{
    internal static VxFormDefinition CreateFromModel(object model, VxFormLayoutOptions options)
    {}
}

and the other is in

public class VxFormGroup
{
        internal static void Add(string fieldIdentifier, VxFormGroup group, object modelInstance, VxFormLayoutOptions options)
        {
        }
}

but I don't know to deal with the FormGroup since you sample data

    protected override void OnInitialized()
    {
        var dict = (IDictionary<String, Object>)Model;
        dict.Add("Name", "add");
        dict.Add("Note", "This is a note");
        dict.Add("Date", DateTime.Now);
        dict.Add("Amount", 1);
        dict.Add("Color", new VxFormGenerator.Models.VxColor("#fff"));
    }

is not given group field.

Nullable Types

Hello thanks for the great work on this library
i just came across an issue, when one of my POCO fields is a nullable type (int?, bool? etc) i get this error:

blazor.server.js:15 [2020-10-06T21:54:43.076Z] Error: System.InvalidOperationException: Unable to set property 'ValueChanged' on object of type 'VxFormGenerator.Components.Bootstrap.BootstrapInputNumber`1[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Nullable`1[System.Int32]]' to type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Int32]'.
 ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Nullable`1[System.Int32]]' to type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Int32]'.
   at Microsoft.AspNetCore.Components.Reflection.MemberAssignment.PropertySetter`2.SetValue(Object target, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|2_0(Object target, IPropertySetter writer, String parameterName, Object value)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|2_0(Object target, IPropertySetter writer, String parameterName, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
   at Microsoft.AspNetCore.Components.ParameterView.SetParameterProperties(Object target)
   at Microsoft.AspNetCore.Components.Forms.InputBase`1.SetParametersAsync(ParameterView parameters)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

by the way in my startup i am defining the initial setup as such:

        public FormGeneratorComponentsRepository BootstrapFormMapping = new FormGeneratorComponentsRepository(
            new Dictionary<string, Type>()
            {
                {typeof(string                                              ).ToString(), typeof(BootstrapInputText)                },
 
                {typeof(DateTime?                                           ).ToString(), typeof(InputDate<>)                       },
                {typeof(bool?                                               ).ToString(), typeof(BootstrapInputCheckbox)            },
                {typeof(decimal?                                            ).ToString(), typeof(BootstrapInputNumber<>)            },
                {typeof(Int32?                                              ).ToString(), typeof(BootstrapInputNumber<>)            },
                {typeof(Int64?                                              ).ToString(), typeof(BootstrapInputNumber<>)            },
                {typeof(float?                                              ).ToString(), typeof(BootstrapInputNumber<>)            },
                {typeof(double?                                             ).ToString(), typeof(BootstrapInputNumber<>)            },

                {typeof(Core.Entities.Project.Status 	                    ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },     
                {typeof(Core.Entities.Project.OrderType 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.CustomerLayout 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.CreditApprovalOptions         ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.FollowUpStatus 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.FollowUpLossExplanation       ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ShippingFOB 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ShippingVia 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ShippingMethod 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ShippingTruckSize 	        ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.Currency 	                    ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.TransportTruckType 	        ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ProjectType 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ProductionType 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.QCErrorZone 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.QCErrorType 	                ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.BorderCrossing 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.FollowUpStopExplanation       ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },
                {typeof(Core.Entities.Project.ProductionSource 	            ).ToString(), typeof(BootstrapInputSelectWithOptions<>) },

                //{typeof(ValueReferences<FoodKind>).ToString(), typeof(BootstrapInputCheckboxMultiple<>) },
                //{typeof(Color).ToString(), typeof(InputColor) }

            }, null, typeof(BootstrapFormElement<>));

thanks for any help or pointers on how to go around this issue.
cheers from Canada !!

Add a WASM example

By popular rquest add a WASM example.

VxFormgenerator should support WASM.

Handle Nullable<bool> in the InputCheckbox component

Hi,
I'm getting this error:

blazor.server.js:19 [2021-02-01T10:38:34.738Z] Error: System.InvalidOperationException: Unable to set property 'ValueChanged' on object of type 'VxFormGenerator.Form.Components.Bootstrap.BootstrapInputCheckbox'. The error was: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Nullable`1[System.Boolean]]' to type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Boolean]'.
 ---> System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Nullable`1[System.Boolean]]' to type 'Microsoft.AspNetCore.Components.EventCallback`1[System.Boolean]'.
   at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action`2 setter, Object target, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|2_0(Object target, PropertySetter writer, String parameterName, Object value)
   --- End of inner exception stack trace ---
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|2_0(Object target, PropertySetter writer, String parameterName, Object value)
   at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
   at Microsoft.AspNetCore.Components.Forms.InputBase`1.SetParametersAsync(ParameterView parameters)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
   at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

Class property
public bool? IsBundle { get; set; }

Add internationalization support

The DisplayAttribute and other non-ValidationAttributes are not localised.
It would be nice to have something to make it available.

Input id specification

I was wondering if it is possible to add a custom Id to the Input field.

[VcInputId("name")] public string Name

So that this id would added to the corresponding input component

<InputText id='name' ... >

Expando Object Not Working

I downloaded the develop branch project, ran it and the dynamic object page displays no fields, it also does the saame in my own project using the latest nuget packages.... - any ideas?

Can we expose the EditForm code?

First of all this is fantastic! My question is often when building a form we have some wonky CSS and or business requirements that require us to have full control over the HTML. Is it possible to just generate the EditForm so we can easily modify it for special situations? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.