Code Monkey home page Code Monkey logo

Comments (19)

ianclough avatar ianclough commented on August 28, 2024 1

Thank you Denis, that does indeed fix it.

It would be nice to see this powerful component promoted to full release status at some point.

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024 1

Mmm... Indeed, the problem seems unresolved in this case.
While we're working on this, you can add the style Style="min-width: 250px;"

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024 1

I found a solution, adding this styles. That will be included in the next release.

.fluent-multi-splitter > .fluent-multi-splitter-pane {
    min-width: auto !important;
    flex-grow: 0;
    flex-shrink: 0;
}

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024 1

This workaround style is overridden by the component style :-(
I think you should wait for the next version to fix this.: #2218

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024 1

This works ! Thank you so much.

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

I will try to solve that quickly.

It seems that the style used (flex-basis: 300px) is not sufficient.
In the meantime, you can add this style to correct, manually, the problem in your code:

<FluentMultiSplitterPane Resizable="false" Size="300px" Style="min-width: 300px;">

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

Yep. I think it's time to do that 😊

from fluentui-blazor.

vnbaaij avatar vnbaaij commented on August 28, 2024

Fixed with PR mentioned

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Should this also work with Resizable="true" set ?
In my case I have a resizable MultiSplitter and want to set inital size in pixels for the first (left) pane.
This does not seems to work.

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

Should this also work with Resizable="true" set ?

If Resizable="true", it depends on the configuration of the other panels.
Do you have a simple example where this doesn't work?

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Hi Denis,

please see the following snippet of MainLayout.razor:


<FluentLayout>
    <FluentHeader>
        BlazorApp
    </FluentHeader>
        <FluentStack Class="main" Orientation="Microsoft.FluentUI.AspNetCore.Components.Orientation.Horizontal" Width="100%">
            <FluentMultiSplitter BarSize="8px">

                <FluentMultiSplitterPane Size="250px" Resizable="true">
                  <NavMenu /> 
                </FluentMultiSplitterPane>

                <FluentMultiSplitterPane >
                    <FluentBodyContent Class="body-content">
                        <div class="content">
                            @Body
                        </div>
                    </FluentBodyContent>
                </FluentMultiSplitterPane>

            </FluentMultiSplitter>
        </FluentStack>
    <FluentFooter>
        <a href="https://www.fluentui-blazor.net" target="_blank">Documentation and demos</a>
        <FluentSpacer />
        <a href="https://learn.microsoft.com/en-us/aspnet/core/blazor" target="_blank">About Blazor</a>
    </FluentFooter>
</FluentLayout>

In this case the left pane IS NOT 250px in width !
If needed I can provide you a full working sample project.

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Setting Style="min-width: 250px;" sets the correct initial width but does not allow the pane to be set smaller than the configured width (as the style implies).
Hopefully this will be able with a fixed Size setting...

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

You can reduce the size but you need to release at least 1 times. And after you can. Not ideal 😟

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Sorry, but what do you exactly mean by "release at least 1 time" ?

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

Release mouse cursor

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

Thank you. This seems not to work on my side. But nevertheless you plan to support setting an initial width with fixed Size setting which also allows shrinking the panes' width afterwards ?

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

Thank you. This seems not to work on my side. But nevertheless you plan to support setting an initial width with fixed Size setting which also allows shrinking the panes' width afterwards

Yes, I will fix this issue for the next release (using the same "width" attribute). I will give you a workaround if possible.

from fluentui-blazor.

emetrix avatar emetrix commented on August 28, 2024

I've added the mentioned CSS to app.css and removed Style="min-width: 250px;":

<FluentMultiSplitterPane Size="250px" Resizable="true">

After this the width is still not 250px !? Did I miss something ?

from fluentui-blazor.

dvoituron avatar dvoituron commented on August 28, 2024

Maybe add the style directly to the component like this?

<FluentMultiSplitterPane Size="250px" Resizable="true" Style="min-width: auto !important; flex-grow: 0; flex-shrink: 0;">

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.