Comments (7)
@David-Moreira, I need your help with this one. For some reason, when the ModalProvider passes the Size parameter to the ModalContent, which is used by the Fluent provider, it seems to never change after that. I cannot figure out what is wrong.
from blazorise.
@David-Moreira, I need your help with this one. For some reason, when the ModalProvider passes the Size parameter to the ModalContent, which is used by the Fluent provider, it seems to never change after that. I cannot figure out what is wrong.
hmm do you have a branch open with the attempt?
from blazorise.
I just did this in the demo
public async Task ShowStateful()
{
if ( statefulModalInstance is null )
{
statefulModalInstance = await ModalService.Show<Counter>( "My Stateful content", new ModalInstanceOptions()
{
Stateful = true,
RenderMode = ModalRenderMode.LazyLoad,
+ Size = ModalSize.ExtraLarge,
} );
return;
}
await ModalService.Show( statefulModalInstance );
}
from blazorise.
Strange I believe I've seen that work. Is it happening provider specifically?
from blazorise.
Yes. For the Fluent provider, I had to propagate the Size from ModalContent
to the Modal
parent component.
from blazorise.
It seems like the custom handlers in FluentUI
to propagate the Size from ModalContent
to the Modal
parent component only propagate on an actual change.
Since the ModalProvider
renders on demand, the Size
parameter will already start defined as Extra Large and will not be detected as a change.
I added the OnInitialized
with similar code and it seems to work properly. Can you verify?
protected override void OnInitialized()
{
if ( ParentModal is FluentUI2.Components.Modal fluentModal )
{
//EDIT: Maybe adding a Size != Default on initialization would be okay to avoid running this code on defaults.
fluentModal.NotifyModalSizeChanged( Size );
fluentModal.NotifyModalCenteredChanged( Centered );
}
base.OnInitialized();
}
from blazorise.
It still doesn't work as expected. It remembers the last size and shows XL for all opened modal instances If you go to the demo tests/modal-provider
, and update
public async Task ShowStateful()
{
if ( statefulModalInstance is null )
{
statefulModalInstance = await ModalService.Show<Counter>( "My Stateful content", new ModalInstanceOptions()
{
Stateful = true,
RenderMode = ModalRenderMode.LazyLoad,
Size = ModalSize.ExtraLarge,
} );
return;
}
await ModalService.Show( statefulModalInstance );
}
launch and click on
Now click on any other demo and it will still show as XL modal.
from blazorise.
Related Issues (20)
- [Bug]: Autocomplete keyboard navigation doesn't work for Tailwind
- Change TimeUpdated interval HOT 3
- Tooltip/Overlay for datagrid columns for specific data HOT 1
- [Bug]: FontAwsome icon id not working together with icon size HOT 7
- RichTextEdit: update to Quill v2.0
- Show licensing messages based on a license state
- [Bug]: ModalProvider does not always work
- Allow Theme cascading value to pass across rendermode boundaries HOT 1
- [Bug]: Icon for IconName.FileAlt incorrectly uses fa-file-lines HOT 2
- [Bug] Video DRM ProtectionHttpRequestHeaders issue
- Change video captions HOT 11
- [Bug]: DataGrid - Aggregate on specific column is not correctly moved with multiple groupings
- [Bug]: DatePicker showing calendar at wrong position using Bootstrap 5 HOT 1
- [Bug]: JSBreakpointModule throwing exceptions HOT 4
- Optional characters counter HOT 1
- Datagrid Aggregates for Columns without field
- [Bug]: Dropdown Item Checkbox does not always toggle on click HOT 3
- Prevent clicking dropdown item from closing the menu HOT 1
- [Bug]: Crash when checking license if chart is inside a slow carrousel. HOT 5
- [Docs] TreeView: Mention how Nodes is a one way binding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blazorise.