Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
adds39939
@adds39939
Yo the MatBlazor site seems broken, tried mutliple browsers and devices
Clark Alesna
@Mercurial
same here
HansM
@SeppPenner
@noamarbel Yeah, that would have been my next suggestion as well :D
@noamarbel @adds39939 @Mercurial Now it seems to be fixed again? As far as I know, there sometimes are issues with the server space (And @SamProf needs to clear this).
HansM
@SeppPenner
@yingwu88 I now understand why {text-align:center;} doesn't work as Style: Style sets the class to the surrounding div. not to the input. I guess, this is quite easy to solve. I will show you an example soon :)
HansM
@SeppPenner
@yingwu88 I will try to create an example project, the fiddle is quite limited in this case...
HansM
@SeppPenner

@yingwu88 What I have tried in CSS so far is this: .mat-text-field-input .mdc-text-field__input ._mdc-text-field--upgraded { text-align: center !important; }

This doesn't work, however...

Artur Gromek
@arturgromek
any contributors have the steps to build the nuget from source?
nevermind :))
Vladimir Samoilenko
@SamProf
@adds39939 Thank you for message about broken website!
noamarbel
@noamarbel
Hello. Any smart ideas on how to display hierarchical data, like data in a JSON that is multi level? Basically a tree view, or a multi level expansion panel. Thanks.
darraghjones
@darraghjones
@page "/"
@using MatBlazor
<MatTextField ValueExpression="@(() => Total)"
              ValueChanged="@(t => UpdateTotal(t))"
              TValue="decimal"></MatTextField>
@code
{
    protected decimal Total => 5;
    protected void UpdateTotal(decimal t)    {    }
}
Surely this should show 5 in the text box? But the property getter isn't firing :/
Using MatBlazor Version="2.0.0"
darraghjones
@darraghjones
hmmm...or should I just be using Value instead of ValueExpression...?
noamarbel
@noamarbel
@darraghjones , you need to be a bit more specific. Do you actually want to do work in UpdateTotal()? or do you want the value of the text box to be reflected in Total?
And the issue is that since Total cannot be changed, and is fixed to 5, I suspect that the changed value gets updated back to 5 after a change.
Keith
@enkodellc
Hi @/all . Just merge Mark Stega's great PR for Blazor Boilerplate with MatBlazor that allows for both CSB and SSB. Hopefully this will help some of you out since you can quickly not Debug with SSB and then publish in CSB if you like. That is what I plan on doing!
yingwu88
@yingwu88
For a <MatTable>, how can I add a "Total" row? I tried to add another <MatTableRow> to the same MatTable, but the page will only show the last <MatTableRow>. Thank you.
yingwu88
@yingwu88
I did see there's a "ShowFooter" attribute for <MatTable>, should I put the column total in the Footer? How should I use the "Footer"? Thank you.
xbpass
@xbpass
Hi All. In latest version datepicker is localize. Which is bad obviously, I've stored my date
So...I stored my date in format I want, it shouldn't be localize...I don't see any option to be switched off, any idea how to solve ? Thanks :)
xbpass
@xbpass
This is server side
xbpass
@xbpass
You can put your template inside the footer just like you do with the header
@yingwu88 sry forget mention nickname...
Katie P
@katiep23
I have this inside of an EditForm & am getting error:
System.InvalidOperationException: MatBlazor.MatSelect`1[System.String] requires a value for the 'ValueExpression' parameter. Normally this is provided automatically when using 'bind-Value'.
<MatSelect Label="Rep Agency" Value="@projectParameters.RepNumber" TValue="string" ValueChanged="@((i)=>RepChanged(i))" Required="true">
HansM
@SeppPenner
@katiep23 First of all, you should either close your Select with /> or with another </MatSelect>... But it should work like that: https://blazorfiddle.com/s/jy8u08so
Dino Novak
@dnovak_gitlab
<MatSelect> with <MatOption> and binding to column with null value? is there a way to handle it as it is breaking with error?
Dino Novak
@dnovak_gitlab
<MatSelect> is there a way to define width?
HansM
@SeppPenner
@dnovak_gitlab I have the same issue now with the MatCheckbox...
@katiep23 Another thought: Is your rep number maybe null?
Dino Novak
@dnovak_gitlab
wondering if regex expression could help?
HansM
@SeppPenner
@SamProf The website under https://www.matblazor.com/Select is somehow broken + it throws errors once you select something in the Select component.
HansM
@SeppPenner
@katiep23 Strange. It works on the fiddle: https://blazorfiddle.com/s/tfgv8x16
John
@JohnKenedy1984_twitter
thanks matblazor team, the UI is perfect for someone who is not good in design
can someone point me out how to deploy matblazor as cordova app? i cant make it work because cordova cannot load fiile with underscore
Igal
@igalfsg
Can someone point me to how to use MatTooltip inside an editForm? I fixed the child context issue by adding <ChildContent Context="editContext"> under the edit form but now I am getting "Microsoft.JSInterop.JSException: Object doesn't support property or method 'addEventListener' TypeError: Object doesn't support property or method 'addEventListener'" when running the code and the tooltip doesnt show up.
Ryanlewis2010
@Ryanlewis2010
Hey am i an idiot or there not a way to change the color of the form fields? i have set the primary and secondary themes but on focus of a form field is defaulted to purple still.
Keith
@enkodellc
@Ryanlewis2010 Here is a CSS solution. Please donate to @SamProf or me -> https://www.paypal.me/enkodellc for MatBlazor and support

.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
color: green !important;
}
.mdc-floating-label {
color: orange !important;
}

.mdc-text-field .mdc-line-ripple {
background-color: Red !important;
}

Ricardo Pacheco
@rcpacheco
What is the recomended way to have an input type color, to choose colors ? I tried the string MatTextField with Type="color", but does not looks that nice
radutomy
@radutomy
@enkodellc can we donate bitcoin?
i loathe using paypal
Keith
@enkodellc
@radutomy I accept crypto but if I haven't helped you directly with support you should donate to @SamProf . He has a patreon https://www.patreon.com/SamProf If you are set on Crypto. I can private message you and my address and I will then contribute to @SamProf. I have helped with a few MatBlazor components but @SamProf is the primary figure. I am mostly tech support and want to help but it does take time. Thanks for using MatBlazor and supporting it.
soomon
@soomon
is there a way to enable / disable MatAutocompleteList based in a variable? Bool would be enough, "has this variable a value? yes -> enable MatAutocompleteList" would be awesome
Ryanlewis2010
@Ryanlewis2010
@soomon i havent tried it myself but i would assume you could set the Disabled param to a @variable and have the option that enables/disable callback a method that sets the variable true/false
soomon
@soomon
I#ll try that thanks
radutomy
@radutomy
@enkodellc happy to donate to @SamProf if you provide Bitcoin/Litecoin address? Sorry I cannot use other means at the moment
Paul Meems
@pmeems

I have a table like this:

<MatTable Items="@forecasts" class="mat-elevation-z5">
<MatTableHeader>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</MatTableHeader>
<MatTableRow>
<td>@context.Date.ToShortDateString()</td>
<td>@context.TemperatureC</td>
<td>@context.TemperatureF</td>
<td>@context.Summary</td>
</MatTableRow>
</MatTable>
Now I added the <AuthorizeView> and <Authorized> tags and I get this error:
The child content element 'MatTableRow' of component 'MatTable' uses the same parameter name ('context') as enclosing child content element 'Authorized' of component 'AuthorizeView'. Specify the parameter name like: '<MatTableRow Context="another_name"> to resolve the ambiguity
I tried changing the table to:

<MatTable Items="@forecasts" class="mat-elevation-z5">
<MatTableHeader>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</MatTableHeader>
<MatTableRow Context="myContext">
<td>@myContext.Date.ToShortDateString()</td>
<td>@myContext.TemperatureC</td>
<td>@myContext.TemperatureF</td>
<td>@myContext.Summary</td>
</MatTableRow>
</MatTable>
But more errors appear:
Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type in \FetchData.razor.g.cs

Paul Meems
@pmeems
Changing <AuthorizeView> to <AuthorizeView Context="AuthorizeContext"> seems to work.
Keith
@enkodellc
@pmeems Yes, I now think it is best practice to define the Context for all AuthorizeView's. There are more examples on my repo: https://github.com/enkodellc/blazorboilerplate
Paul Meems
@pmeems
Thanks @enkodellc I found the example already in your repo.