I have been working with Blazor quite a bit (https://blazorboilerplate.com) but I have a bit of a issue that has stumped me tonight with adding some custom D3 code to my blazor pages. The D3 / Javascript code creates several DOM input elements and I wish to retrieve the values of these created elements so I can save a DTO to my database with those values. How can I do this and what is the most efficient way? Should I just create a JSInterop method to return the input values?
domInput.attr("@ref", function (d3) {return d3.key});
I tried creating "@ref" attributes so I could use the ElementReference but D3 errors when I try to append an attribute that begins with '@'