Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.28k stars 530 forks source link

Getting error when implementing Tooltip after the Blazorise 8.0.3 update #238

Closed ajai1109 closed 5 years ago

ajai1109 commented 5 years ago

Microsoft.JSInterop.JSException: Could not find 'blazoriseMaterial' in 'window'. Error: Could not find 'blazoriseMaterial' in 'window'. at https://localhost:44311/_framework/blazor.server.js:8:27768 at Array.forEach () at d (https://localhost:44311/_framework/blazor.server.js:8:27729) at https://localhost:44311/_framework/blazor.server.js:8:28342 at new Promise () at e.beginInvokeJSFromDotNet (https://localhost:44311/_framework/blazor.server.js:8:28316) at https://localhost:44311/_framework/blazor.server.js:1:19148 at Array.forEach () at e.invokeClientMethod (https://localhost:44311/_framework/blazor.server.js:1:19119) at e.processIncomingData (https://localhost:44311/_framework/blazor.server.js:1:17165) at Microsoft.JSInterop.JSRuntimeBase.InvokeWithDefaultCancellation[T](String identifier, IEnumerable`1 args) at Blazorise.BaseTooltip.b__1_0() at Blazorise.BaseComponent.OnAfterRenderAsync() at Microsoft.AspNetCore.Components.Rendering.Renderer.GetErrorHandledTask(Task taskToHandle)

stsrki commented 5 years ago

You're probably missing java-script files. See this guide: https://github.com/stsrki/Blazorise#server-side

ajai1109 commented 5 years ago

Ok I think I have to update the latest bundle.zip. I will let you know after I update. Thanks!

stsrki commented 5 years ago

@ajai1109 if you've managed to fix error please close the issue. tnx

ajai1109 commented 5 years ago

@ajai1109 if you've managed to fix error please close the issue. tnx

@stsrki Issue is not solved. I have created new blazor server app with blazorise and used java-script, still I am getting the same issue. Given below the project link for your reference

https://github.com/ajai1109/Blazorise

stsrki commented 5 years ago

I have modified your html and it should work now. See the difference bellow.

@page "/"
@namespace BlazorApp13.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>BlazorApp13</title>
    <base href="~/" />
    <!-- Material CSS -->
    <link href="css/material.min.css" rel="stylesheet">

    <!-- Add Material font (Roboto) and Material icon as needed -->
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i|Roboto+Mono:300,400,700|Roboto+Slab:300,400,700" rel="stylesheet">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Material JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
    <script src="js/material.min.js"></script>

    <link href="~/blazorise.css" rel="stylesheet" />
-   <link href="~/blazorise.bootstrap.css" rel="stylesheet" />
+   <link href="~/blazorise.material.css" rel="stylesheet" />
    <link href="~/blazorise.sidebar.css" rel="stylesheet" />
    <link href="~/blazorise.snackbar.css" rel="stylesheet" />

    <script src="~/blazorise.js"></script>
-   <script src="~/blazorise.bootstrap.js"></script>
+   <script src="~/blazorise.material.js"></script>
    <script src="~/blazorise.charts.js"></script>
    @* <script src="blazorise.sidebar.js"></script>*@

-   <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
+   <link rel="stylesheet" href="css/material.css" />
   <link href="css/site.css" rel="stylesheet" />
</head>
<body>
    <app>
        @* Remove the following line of code to disable prerendering *@
        @*@(await Html.RenderStaticComponentAsync<App>())*@
    </app>

    <script src="_framework/blazor.server.js"></script>
</body>
</html>
ajai1109 commented 5 years ago

@stsrki Thank you very much. Now the tooltip issue is solved, but now the dateedit component is not working properly, Only once it is showing the calendar and we can select the date. When we click next time calendar is disappearing immediately. Please refer the below source for your reference. https://github.com/ajai1109/Blazorise

ajai1109 commented 5 years ago

@stsrki Thank you very much. Now the tooltip issue is solved, but now the dateedit component is not working properly, Only once it is showing the calendar and we can select the date. When we click next time calendar is disappearing immediately. Please refer the below source for your reference. https://github.com/ajai1109/Blazorise

The same dateedit date selection issue happening in blazorise demo forms. Calendar hiding immediately after the first click. https://materialdemo.blazorise.com/tests/forms

stsrki commented 5 years ago

It seems it's a bug. I will close this issue and open new regarding the DemoEdit.