Open drma-tech opened 2 years ago
Hmm it took me a while to figure out what you wanted, maybe what you want is to figure out what media breakpoint is currently set? If tablet do smthg if mobile etc... @stsrki do we have any feature or helper for this? Well other then the Fluent builders ofc
that's right.
The only way to not process the component is to have it behind the if
statement. Other than that, if you want a more declarative approach then try the @mrpmorris https://github.com/mrpmorris/Morris.Blazor.ControlFlow
but how is it possible to use Display with this component?
my intention is to identify the breakpoint in the code.
Do you mean to know the actual state of the Display? That is not possible. It is one directional. We just transform the Display utility to CSS class names and from there it's up to the Bootstrap CSS to handle it.
This library might help: https://github.com/EdCharbeneau/BlazorSize
Do you mean to know the actual state of the Display? That is not possible. It is one directional. We just transform the Display utility to CSS class names and from there it's up to the Bootstrap CSS to handle it.
So, I was thinking about the following: if at some point you capture this information, you could store it in some public property.
We have it on backlog #3607
This library might help: https://github.com/EdCharbeneau/BlazorSize
thanks. I will test this.
It works beautifully.
@stsrki you can be inspired by the code of this component to work on this backlog.
the problem is: it keeps rendering and the code keeps processing. there is no way to access this display by code, so use the blazor pattern? @if (display == ...) {} with that, I avoid processing this component, instead of just hiding it.