blazor

Best way to get list of child components in Blazor

↘锁芯ラ 提交于 2020-06-29 05:07:39
问题 We need to get list of child components in OnAfterRenderAsync method of parent component but, we don't know how to do that. We try with RenderBuilder and GetFrames but this is always null. We have Splitter component with N Split Areas as child components and we need to get all areas in Parent component, in OnAfterRenderAsync method. 回答1: If you have a parent component of type X and you want to references to all tightly coupled children of type Y (for example, TabControl and TabPages) then you

Wasm DOM access and Reference types

徘徊边缘 提交于 2020-06-29 03:48:56
问题 I have been following very closely the roadmap for webassembly, specially the performance hit of calling JS interop. As part of this reference types proposal we are going to be able to have basic manipulation of tables inside Wasm. Phase 4 has been approved June 23rd meeting. Firefox and Chrome are working on the implementation of this proposal WebAssembly roadmap. Chromium implementation. Based on this answer Wasm access dom. and quoting chromium description Allow WebAssembly modules to hold

Wasm DOM access and Reference types

余生长醉 提交于 2020-06-29 03:48:12
问题 I have been following very closely the roadmap for webassembly, specially the performance hit of calling JS interop. As part of this reference types proposal we are going to be able to have basic manipulation of tables inside Wasm. Phase 4 has been approved June 23rd meeting. Firefox and Chrome are working on the implementation of this proposal WebAssembly roadmap. Chromium implementation. Based on this answer Wasm access dom. and quoting chromium description Allow WebAssembly modules to hold

Blazor WebAssembly 3.1 Target Framework is missing

旧城冷巷雨未停 提交于 2020-06-28 07:19:27
问题 I created a .NET Core Web API and class library with .NET Standard 3.1. But when I try to create Blazor WebAssembly with 3.1, it automatically creates a 2.1 version - as seen here: This is my Blazor web and .NET Core 3.1 is not listed. I install the 3.1 version again but still not listing. I already have .NET Core 3.1 version on Web API and class library but I don't understand why I can not create Blazor 3.1. But when can I create blazor server side application as 3.1 but I can't create web

Why can't I load any js after my blazor.server.js?

别来无恙 提交于 2020-06-28 03:59:41
问题 So I noticed that in my _Host.cshtml file I have this script before the </body> tag <script src="_framework/blazor.server.js"></script> And I also have some scripts that are suppose to load after that which are these <script src="assets/plugins/jquery/jquery.min.js"></script> <script src="assets/plugins/jquery-ui/jquery-ui.js"></script> <script src="assets/plugins/popper/popper.js"></script> <script src="assets/plugins/feather/feather.min.js"></script> <script src="assets/plugins/bootstrap/js

The current thread is not associated with the Dispatcher. Use InvokeAsync() to switch execution to the Dispatcher when triggering rendering

时光怂恿深爱的人放手 提交于 2020-06-27 17:20:06
问题 I am working on Dotnet Core Blazor and getting below error while using EventCallBack to bind the parent grid after delete events. Below the code for using Child component <tbody> @foreach (var employee in Employees) { <BlazorAppDemo.Pages.Controls.EmployeeList Employee="employee" ShowFooter="ShowFooter" OnEmployeeSelectionChange="onEmployeeSelectionChanged" btnDeleteClick="OnEmployeeDeleted" > </BlazorAppDemo.Pages.Controls.EmployeeList> } </tbody> EmployeeList child component is below <tr> @

Is it possible to embed a Blazor component in a non .NET website?

半城伤御伤魂 提交于 2020-06-27 15:33:20
问题 We would like to develop a client-side Blazor component for one of our clients to embed on a page in their website. The website is written with Drupal, but really my question refers to integrating Blazor into any non-ASP.NET website. This image from https://www.nativoplus.studio/blog/blazor-introduction/ seems to suggest that this should be possible as none of the runtime parts are relying on a .NET host: As I understand it, a client-side Blazor component is run using a combination of WASM

TinyMCE disappears in Blazor page

眉间皱痕 提交于 2020-06-27 12:48:07
问题 I want to use TinyMCE in a Blazor server side app, but it shows up on page load for a second and then disappears. I blame it on StatehasChanged() thus I have written an interop function that re-initializes TinyMCE and is called in the OnAfterRender() of the page. This is the JS interop function: initTinyMce: function (tinyMceID) { tinymce.init({ selector: 'textarea.tinyMce' }); return ""; //var editor = tinyMCE.get(tinyMceID); //if (editor && editor instanceof tinymce.Editor) { // editor.init

Blazor in Azure: The list of component records is not valid

血红的双手。 提交于 2020-06-27 10:22:29
问题 When deploying our blazor app to azure, it fails four out of five times with this error (copied from chrome dev tools): [2019-12-16T11:12:55.214Z] Information: Normalizing '_blazor' to 'https://example.com/_blazor'. [2019-12-16T11:12:55.470Z] Information: WebSocket connected to wss://example-web-signalr-service.service.signalr.net/client/?hub=componenthub&asrs.op=%2F_blazor&negotiateVersion=1&asrs_request_id=...&id=...&access_token=... [2019-12-16T11:12:55.548Z] Error: The list of component

How to enable/disable inputs in blazor

徘徊边缘 提交于 2020-06-27 06:46:14
问题 I am trying to Enable/Disable a group of time inputs in Blazor based on a checkbox ; while for inputs of type button the below solution works ,for inputs of type time it doesn't : Solution for button input that works: <button type="button" class="@this.SetButton"></button> [Parameter] public bool state { get; set; } public string SetButton() { string result = state ? "" : "disabled"; return result; } Attempt for time inputs that does not work: <input bind="@IsDisabled" type="checkbox" />