Skip to content

feat: add PaneNext info to FluentMultiSplitter events when cancelled #4081

@DanielCordell

Description

@DanielCordell

🙋 Feature Request

Been looking through the FluentMultiSplitter code, trying to manually control the sizes of all of the panes myself. This means that I'm needing to cancel the events and control it manually, as if I don't cancel the events, the SizeRuntime field blocks me from manually passing in any value in the future (so I can never manually change it again).

I've noticed that in the code, if the OnResize event args are cancel-ed, we don't create the event for the paneNext event, as we do the cancel check before the paneNextIndex check. https://github.com/microsoft/fluentui-blazor/blob/dev/src/Core/Components/Splitter/FluentMultiSplitter.razor.cs#L160

Is this intentional? It's a pain as I basically want to be able to manually set the sizes myself (so I need to cancel), but I need to also know how the "other" pane size has changed too.

Alternatively (and possibly easier) I need to be able to explicitly set the height of a pane even if it's been resized, as I know once we resize using the dragger for the first time we can no longer pass in an explicit height due to SizeRuntime.

🤔 Expected Behavior

Some way to either:

  • Get the PaneNext new size info via an event of FluentMultiSplitterResizeEventArgs even when the event has been cancelled (may be harder).
  • Explicitly set the size of a pane programmatically, overriding SizeRuntime so that we don't need to cancel the events to manually control the size of the panes.

😯 Current Behavior

Currently, there is no way to both of these:

  • Use the current resize behaviour where dragging the splitter to adjust the size of the current and next pane at the same time.
  • Manually adjust the size of a pane programmatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: author feedbackThe author of this issue needs to respond in order for us to continue investigating this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions