SamProf on mdc-web-10
upgrade matTextField (compare)
SamProf on mdc-web-10
MatSlideToggle renamed to MatSw… (compare)
SamProf on mdc-web-10
fix matslider (compare)
How to use MatSelectItem, i get compiletime error on simple operation ValueChange
`
<MatSelectItem ValueChanged="@(async (string x) => { await OnChangeExchange(x); })" Value="Exchange.All" Label="Exchange" Items="@exchanges"></MatSelectItem>
@code {
IReadOnlyList<Exchange> exchanges = Enum.GetValues(typeof(Exchange)).Cast<Exchange>().ToList();
private async Task OnChangeExchange(string value)
{
}
}
`
error: Type arguments for the method "TypeInference.CreateMatSelectItem_1 <TValue> (RenderTreeBuilder, int, int, EventCallback <TValue>
, int, TValue, int, string, int, IReadOnlyList <TValue>) "cannot be determined by use. Try to explicitly define the type arguments.
I'm using
MatSelectItem
and binding theDisabled
Property. When the property is initially true and then made false, the selection box does not open to show the options. Before I submit a bug in the repo, can someone else verify as well?
I have the same problem when I update my package to 2.8. The only workaround I found is to use the 2.6.2 version... I still want to use the latest feature that the package offer, have you submit the bug to the repo ?
@if(disabled) { <MatSelectItem /> } else { <MatSelectItem /> }
@Chadley08 Your own component will have its CSS isolation, as will MatBlazor's. Each being isolated by the nature of isolation. (That's a Blazor feature, not MatBlazor)
You're asking is there's a way for a CSS isolated component to NOT be CSS isolated - more like "scoped" to your component. I've no idea if that exists?
It sounds like you actually want to define a css class, and just pass on the CSS class name in the "Class" parameter of your MatBlazor components? If not, you can write to the "Style" parameter each time you use a MatBlazor component. That would give you isolation in the raw sense.
@bind-IsOpen
to share the state between your own code, and a MatDialog. I tend to make a hand-coded property where the setter can run some other code. It acts like an event-callback because you can run code on the setter. So when MatDialog closes, it sets the IsOpen to false, and your code can run. I've modified one of the MatDialog examples here to demonstrate. Note the text that appears at the top when the dialog is closed in any way.
@ref=
then unless you're also going to access your component behind an interface, - the event handling code is marked public, and should likely be private or protected virtual?. Happy coding!
display:none !important;
to be applied to .flatpickr-months
and .flatpickr-innerContainer
. You'd need to adjust the formatting of the output so it only shows the time too. Sure sounds like a whole new component to me! Perhaps raise this as a MatBlazor Feature Request over on issues