Code Monkey home page Code Monkey logo

Comments (5)

vnbaaij avatar vnbaaij commented on August 28, 2024

You are coding the logic for the tooltips inside of the FluentNavMenu which is not necessary and leads to this result. I think it is because things are happening in the renderprocess of the component which mess with the (expanded) state.

Not diving further into this because of time constraints and it can easily be solved by moving the @if block outside of the FluentNavMenu tag.

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Hi Vincent,

changing code

<div class="navmenu">
    <input type="checkbox" title="Menu expand/collapse toggle" id="navmenu-toggle" class="navmenu-icon" />
    <label for="navmenu-toggle" class="navmenu-icon"><FluentIcon Value="@(new Icons.Regular.Size20.Navigation())" Color="Color.Fill" /></label>
    <nav class="sitenav" aria-labelledby="main-menu">
        <FluentNavMenu Id="main-menu" Collapsible="true" Width="250" Title="Navigation menu" @bind-Expanded="expanded" CustomToggle="true">
            <FluentNavLink Href="/" Match="NavLinkMatch.All" Icon="@(new Icons.Regular.Size20.Home())" IconColor="Color.Accent">Home</FluentNavLink>
            <FluentNavLink Id="counter" Href="counter" Icon="@(new Icons.Regular.Size20.NumberSymbolSquare())" IconColor="Color.Accent">Counter</FluentNavLink>
            <FluentNavLink Id="weather" Href="weather" Icon="@(new Icons.Regular.Size20.WeatherPartlyCloudyDay())" IconColor="Color.Accent">Weather</FluentNavLink>
        </FluentNavMenu>


        @if (expanded == false)
        {
            <FluentTooltip Anchor="counter" HideTooltipOnCursorLeave="true" Position=TooltipPosition.End Delay=200>Counter</FluentTooltip>
            <FluentTooltip Anchor="weather" HideTooltipOnCursorLeave="true" Position=TooltipPosition.End Delay=200>Weather</FluentTooltip>
        }
    </nav>
</div>


@code {
    private bool expanded = true;
}

does not change the behaviour. The exceptions still occur.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on August 28, 2024

Yes, I'm seeing it too now. Re-opened.

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on August 28, 2024

The error is triggered in the web components script.
Reproduce steps:

  • Collapse the menu
  • Do not invoke a tooltip
  • Expand the menu
  • Hover over a menu item that would show a tooltip

I can see that on our side the tooltips get added to the provider when the menu is collapsed and that they get removed once the menu is expanded.

Not sure if we will be able to prevent this error on our side...

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on August 28, 2024

I've confirmed internally that this is an issue with the web components script. Unfortunately, i will not be fixed anymore in the v2 branch.
Closing it here because we can't fix this

from fluentui-blazor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.