Hide tool bar content
Added a flag usefull to hide toolbarcontent dinamycally under specified conditions
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.63%. Comparing base (
cdbeeed) to head (c4ac728). Report is 1293 commits behind head on dev.
Additional details and impacted files
@@ Coverage Diff @@
## dev #6602 +/- ##
==========================================
- Coverage 91.42% 90.63% -0.79%
==========================================
Files 398 399 +1
Lines 14954 13582 -1372
==========================================
- Hits 13671 12310 -1361
+ Misses 1283 1272 -11
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi @cesaremarasco. Looks like there are no file changes in your PR, did you revert your first commit?
Please can you check now. This flag (HideToolBarContent) is usefull when you need to hide dinamically toolbarcontent under specified conditions. Now look like that there isn't no way to hide toolbar content dinamically
I think HideToolBar is a better name as the feature hides the entire <MudToolBar> and not only its content.
On the other hand, perhaps this extra parameter is overkill since the same can be achieved like so:
<MudToolBar Style="display:none;"> or <MudToolBar Class="d-none">
Would this count as "Disable something"?
Because since that is discouraged as of v7 wouldn't it be better to have something like ShowToolbar / ToolbarVisibleand have it default to true?
Can this not be done with an @if( ... ) { } in razor by the user?
I am pretty sure it can be done like this:
<ToolbarContent>
@if(_iWantToShowMyContent)
{
This is my toolbar content
}
</ToolbarContent>
So this PR doesn't add value to the library IMO. Closing, but if you can bring forth good arguments why the parameter is needed we can reopen.
I am pretty sure it can be done like this:
<ToolbarContent> @if(_iWantToShowMyContent) { This is my toolbar content } </ToolbarContent>
Not really. Even if the content inside the render fragment is empty, it will show an empty-space toolbar that takes space because of the --mud-internal-toolbar-height, gutters etc.
I see, I wasn't aware that this is about MudTable. There is another workaround for this, you can conditionally supply null to the ToolbarContent renderfragment.