Data binding in Blazor: How to propagate values out of a component?

前端 未结 1 1025
你的背包
你的背包 2020-12-20 04:11

I have a fairly simple component, which looks like this:

相关标签:
1条回答
  • 2020-12-20 04:33

    You need to add an EventCallback parameter to do that:

    @code {
    
        [Parameter]
        public string Value { get; set; }
    
        [Parameter]
        public EventCallback<string> ValueChanged { get; set; }
    }
    

    read the section Data binding/Component parameters

    0 讨论(0)
提交回复
热议问题