Blazored / Typeahead

Typeahead control for Blazor applications
https://blazored.github.io/Typeahead/
MIT License
439 stars 103 forks source link

no drop down event error #53

Closed dtitovgis closed 4 years ago

dtitovgis commented 4 years ago

If not drop down/typing event i have error then submit the editContext. example

    <p>
        <label>ИТСО</label>
        <BlazoredTypeaheadInput SearchMethod="@(async (s)=>await SearchITSO(s))"
                                @bind-Value="@specificationDP.ITSO">
            <SelectedTemplate Context="itso">
                @itso.Name
            </SelectedTemplate>
            <ResultTemplate Context="itso">
                Наименование: @itso.Name<br>
                Код оборудования: @itso.DeviceCode<br>
            </ResultTemplate>
        </BlazoredTypeaheadInput>
    </p>

Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Cannot read property 'addEventListener' of null TypeError: Cannot read property 'addEventListener' of null at Object.addFocusoutEventListener (http://localhost:55460/_content/Blazored.Typeahead/blazored-typeahead.js:7:17) at http://localhost:55460/_framework/blazor.server.js:8:28738 at new Promise () at e.beginInvokeJSFromDotNet (http://localhost:55460/_framework/blazor.server.js:8:28707) at http://localhost:55460/_framework/blazor.server.js:1:19148 at Array.forEach () at e.invokeClientMethod (http://localhost:55460/_framework/blazor.server.js:1:19119) at e.processIncomingData (http://localhost:55460/_framework/blazor.server.js:1:17165) at e.connection.onreceive (http://localhost:55460/_framework/blazor.server.js:1:10276) at WebSocket.i.onmessage (http://localhost:55460/_framework/blazor.server.js:1:38027)

vertonghenb commented 4 years ago

@dtitovgis Thanks for bringing this to our attention, do you have some reproduction steps or preferably a codebase we can test this out with?

chrissainty commented 4 years ago

@dtitovgis I'm not sure what's causing this but I think this will be fixed in the upcoming release (hopefully tomorrow). A lot of code has changed in the new version and I'm not seeing this error when doing what you describe.