Skip to content

[dev-v5] FluentToast does not respect DefaultValues #4769

@MarvinKlein1508

Description

@MarvinKlein1508

🐛 Bug Report

I want to setup my toasts globally to alway be on the TopEnd are dismissible and inverted by default. So I tried to use the built in default values feature to specify these values. However they are being ignored.

As a workaround you can create a custom extension method which always sets this values to the FluentOptions but I believe it would be great if this was supported out of the box.

💻 Repro or Code Sample

I defined this two default values in Program.cs

options.DefaultValues.For<FluentToast>().Set(p => p.IsDismissable, true);
options.DefaultValues.For<FluentToast>().Set(p => p.Position, ToastPosition.TopEnd);

🤔 Expected Behavior

I expect the default values to be respected

😯 Current Behavior

They will be ignored completely.

💁 Possible Solution

🔦 Context

🌍 Your Environment

  • OS & Device: [e.g. MacOS, iOS, Windows, Linux] on [iPhone 7, PC]
  • Browser [e.g. Microsoft Edge, Google Chrome, Apple Safari, Mozilla FireFox]
  • .NET and Fluent UI Blazor library Version [e.g. 8.0.2 and 4.4.1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-investigationNeeds additional investigationv5For the next major version

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions