Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 07:58
    dorana commented #277
  • 07:58
    StefanSoderberg commented #277
  • 07:57
    StefanSoderberg commented #277
  • 03:27
    KaydenMiller starred SamProf/MatBlazor
  • 02:28
    khew81 commented #757
  • 01:17
    RobWunderlich starred SamProf/MatBlazor
  • Oct 25 18:41
    Christian-Oleson commented #757
  • Oct 25 17:34
    khew81 commented #757
  • Oct 25 15:56
    Kylar182 labeled #767
  • Oct 25 15:56
    Kylar182 opened #767
  • Oct 25 14:11
  • Oct 25 13:41
    Christian-Oleson commented #760
  • Oct 25 12:05
    khew81 commented #766
  • Oct 25 12:04
    khew81 commented #766
  • Oct 25 12:04
    khew81 commented #766
  • Oct 25 08:21
    khew81 opened #766
  • Oct 25 08:21
    khew81 labeled #766
  • Oct 25 05:36
    snarlynarwhal starred SamProf/MatBlazor
  • Oct 25 04:30
    virzak starred SamProf/MatBlazor
  • Oct 25 04:12
    linxmouse starred SamProf/MatBlazor
khew81
@khew81
image.png
I'm currently using <MatSelectItem> component, how do I bind the value of my object's property to @bind-Value?
Without @bind-Value I actually can see a list of items with the class type which I am able to confirm my list of item is loaded into this component just that the @bind-Value is not setup properly yet
Christian Oleson
@Christian-Oleson
One way to do so is have a field of the objects property type. E.g if I have a car object and I want to bind on the car make (Toyota) I can have a string carMake which I bind the value to when I select the item in my array/dictionary/list (whatever it is).
Likewise, your Items appear to not be a list, which is part of your problem. It expects a list from which it creates the drop down.
There’s a few good examples on the Matblazor website
Christian Oleson
@Christian-Oleson
@quilnux ,
There should be an option in Patreon to do $10 or more which gives you a limit of up to $15k per month
1 reply
khew81
@khew81

One way to do so is have a field of the objects property type. E.g if I have a car object and I want to bind on the car make (Toyota) I can have a string carMake which I bind the value to when I select the item in my array/dictionary/list (whatever it is).

Do you mean that I have to create another List<string> in order to bind to the bind-value

Victor Lindespång
@lindespang
@quilnux It's MIT licensed so it basically involves both business and non-business use - with all the terms that comes with the MIT license. If you wan't to support MatBlazor with more than $10 a month I think your best bet is to contact @samprof here on gitter and initialize a discussion.
Truong Duong
@ttanduong
image.png
Truong Duong
@ttanduong
Good afternoon everyone, I have a problem with MatBlazor dialog. Please help me. In the above picture, how can I separate my 2 buttons (on dialog bottom) from Scroll content (MatDialogContent)? In this dialog, I use Editform for validation inside MatDialogContent block
Micaela Tucker
@moimicaelat
Hi :) Is there a way to get the value of a specific column in a specific row in a MatTable?
Micaela Tucker
@moimicaelat
Actually, I think I figured out that you can define a row as the object being passed when OnRowDbClick is used and then, as long as that row isn't empty, then you can get the value of a specific column and set it to a string.
Sergey Perfilev
@perfilev_gitlab
Hi) Does anyone know how to set value of MatSelect programmatically? I need initialize it with form's value (for editing), but seems that two-way binding is not working (or working incorrectly). Currently I'm using 2.6.2, but problem also persist on 2.7.0.
Oh, looks like already known bug - SamProf/MatBlazor#636
Any workaround here?
Sergey Perfilev
@perfilev_gitlab

so far did this:

# _Host.cshtml

<script>

    // dirty hack
    let f = matBlazor.matSelect.setValue;
    let f1 = function(...args) {
        let r = f(...args);
        let el = document.getElementById(args[0].getAttribute("prefix") + args[1]);
        if (el !== null)
            el.click();
        return r;
    };
    matBlazor.matSelect.setValue = f1;

</script>

and

<MatSelect Prefix="level_" FullWidth="true" Class="mb-2 full-width" Label="Next Level" @bind-Value="_form.NextLevel">
    <MatOptionString ></MatOptionString>
    @foreach (var o in options.Options_)
    {
        <MatOptionString Id="@($"level_{o.Key}")" Value="@o.Key.ToString()">@o.Value</MatOptionString>
    }
</MatSelect>

@code {

    _form.NextLevel = "1";

}
khew81
@khew81
anyone has any idea to do vertical button groups?
khew81
@khew81
Is is possible to pop out calendar when I click on the calendar field?
khew81
@khew81
just wondering is this community dead?
Christian Oleson
@Christian-Oleson
No, it is not
The pop out may be possible with a dialog, but I’m not wholly certain
khew81
@khew81
hmm I see
Christian Oleson
@Christian-Oleson
A few of the regular contributors I believe have kids that are you ( at least I know of two) so sometimes thing get busy
We are always looking for contributions, squashing bugs and such
khew81
@khew81
Any reference to get value back from datepicker? I've google but results are less
i dont mind to contribute if im capable
Christian Oleson
@Christian-Oleson
Check the documentation. You can always take a look at the code if it clearer.
But yup, that’s be great. There are some easy first issues if you’re looking to get involved
Christian Oleson
@Christian-Oleson
@moimicaelat ,
So did you get your issue resolved?
khew81
@khew81

Check the documentation. You can always take a look at the code if it clearer.

could u point me to the sample code?

Christian Oleson
@Christian-Oleson
@ttanduong ,
I think that is entirely a CSS issue.
@khew81
khew81
@khew81
yeah I got this but I want to get the value back when user selected the date
Christian Oleson
@Christian-Oleson
You can bind to a value and use one of the events like OnKeyPress to get notified of the event
khew81
@khew81
I will try
thankss
btw can I ask you where should I call my javascript function on page refresh?
Christian Oleson
@Christian-Oleson
Or even OnClick=“YourMethodHere(myBoundValue)”
khew81
@khew81
it is actually a google map initialize function wihch will render the map to the div
I shall call it in OnInitializedAsync or OnAfterRenderAsync?
Christian Oleson
@Christian-Oleson
It am not following the JS question?
It’s sounds dependent on your need?
khew81
@khew81
sometimes the client call the function before the javascript function was loaded, but sometimes it works, it's not consistent
Christian Oleson
@Christian-Oleson
I unfortunately won’t have an answer there
khew81
@khew81
it's ok
roxxel
@roxxel
Hey guys, can someone explain me how to use paginator please?
Christian Oleson
@Christian-Oleson
@roxxel ,
Is there something in particular with the pagination your are struggling with?
khew81
@khew81

I unfortunately won’t have an answer there

I have to include those all Javascript file before including blazor.server.js. Just a reference for those beginner to Blazor.