Open fedegen opened 4 years ago
Same
Thanks for using MatBlazor, I'll take a look at it tomorrow.
Hello there. Thanks for the awesome product. Any luck with a workaround or fix for dropdown preselection? My client seems to be raising a stink about it but everything else seems clean and awesome. Lmk please . Also are you on Patreon?
@allnet Hi, will take a look at it over the weekend and hopefully fix. Could not find the time yet. The author of this repository @SamProf has a Patreon page https://www.patreon.com/SamProf
Btw this one is related to #524 (Probably the same issue)
I've identified the issue and will submit a PR in the near future.
Awesome. Thanks so much. Really need this last piece to know this project out of the park. Lol
On May 7, 2020, at 2:32 PM, Victor Lindespång notifications@github.com wrote:
I've identified the issue and will submit a PR in the near future.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SamProf/MatBlazor/issues/494#issuecomment-625508458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3MO4LBQSXNV3PV66MNXU3RQMSG5ANCNFSM4MFX4OCQ.
(Copying from previous closed issue)
Seems as there was a problem with the MDC select Component that was recently fixed https://github.com/material-components/material-components-web/pull/5870
Unfortunately it just missed the 6.0.0 release.
I think this will solve the issue and don't think I want to do apply my hack in MatBlazor until I can see how this fix turns out.
... Hmm but I think I found something that looks weird anyway in MatSelect, reporting back shortly..
Will wait until new MDC Select, sorry.
The workaround is to have your collection initialized before supplying it to the MatSelect since this problem appears if you change the collection after the component has been rendered. So if you have async calls to another API then wait until you have your results before you render your MatSelect.
Why it works in some places and/or sometimes is since there may be (depending on implementation) a race condition between the async service call and the rendering of the MatSelect.
The reason for the FormatException is since we are parsing a JS string representing the index on change returned from the MDCSelect which in this case is an empty string => crash.
Thanks so much. Got it working. Looks great!!
Do you do any work for hire on the side?
On May 9, 2020, at 6:39 AM, Victor Lindespång notifications@github.com wrote:
Will wait until new MDC Select, sorry.
The workaround is to have your collection initialized before supplying it to the MatSelect since this problem appears if you change the collection after the component has been rendered. So if you have async calls to another API then wait until you have your results before you render your MatSelect.
Why it works in some places and/or sometimes is since there may be (depending on implementation) a race condition between the async service call and the rendering of the MatSelect.
The reason for the FormatException is since we are parsing a JS string representing the index on change returned from the MDCSelect which in this case is an empty string => crash.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SamProf/MatBlazor/issues/494#issuecomment-626177713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3MO4N2YMAFT3HSWGAUJV3RQVMH5ANCNFSM4MFX4OCQ.
This is unfortunatelly not a workaround for me. As I mentioned in my original issue, I need to change the bound collection in runtime based on user interaction, after the component is first rendered.
@doyce I understand. Depending on the frequency of the user interaction it might be feasible to re-render the component?
@allnet Glad to hear it. Not right now since I have a 7 week old kid that is in the centre of attention at the moment :)
Also one last question, how do I set a background color for MatTableRow? I want it to be based on evaluating a simple method to determine the color.
I’m sure there is probably some convention I could apply when I need to override the theme. Let me know even if you just point me to a link. Couldn’t really find anything when I looked but I’m an experienced developer but somewhat new to web development.
Thanks
On May 9, 2020, at 6:31 PM, Darryl Hill allnetxr@icloud.com wrote:
Thanks so much. Got it working. Looks great!!
Do you do any work for hire on the side?
On May 9, 2020, at 6:39 AM, Victor Lindespång <notifications@github.com mailto:notifications@github.com> wrote:
Will wait until new MDC Select, sorry.
The workaround is to have your collection initialized before supplying it to the MatSelect since this problem appears if you change the collection after the component has been rendered. So if you have async calls to another API then wait until you have your results before you render your MatSelect.
Why it works in some places and/or sometimes is since there may be (depending on implementation) a race condition between the async service call and the rendering of the MatSelect.
The reason for the FormatException is since we are parsing a JS string representing the index on change returned from the MDCSelect which in this case is an empty string => crash.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SamProf/MatBlazor/issues/494#issuecomment-626177713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3MO4N2YMAFT3HSWGAUJV3RQVMH5ANCNFSM4MFX4OCQ.
@allnet It's not supported in the MatBlazor API, but you can alter the <td>
elements with Blazor syntax to get what you want.
https://blazorfiddle.com/s/fffkrbjd
In my example it's inline style but you can do conditional css classes aswell.
Please acknowledge when you have read this and I will delete both our comments to keep this issue nice and tidy. In the future please create new issue to help us keep this repo clean 😉
@lindespang What exactly do you mean by re-rendering the component?
Is there any progress with the bug? I noticed that MatBlazor version 2.6.0 includes MDC components 6.0.0 but the bug is still there.
Just donated some more cash to your PayPal.
Quick question, how did you get the color selector widget that you use in the demo for MatBlazor ?
Would love to implement something similar in the setup of one of my apps. You also have this implemented in the top bar with a tear drop color selector.
I would take either one or both if possible . Hopefully you can just copy and paste from the razor file or send me both html/razor files and I’ll find it.
Just cant seem to figure out how you did it. Thanks so much.
1)
2)
Would love to have both snippets.
Thanks
I wonder if this bug will ever be fixed. It can sure be workarounded but I need to workaround it everywhere I use MatSelect component which is pretty annoying. In one case I even needed to replace the component completely because the workaround doesn't work.
Hi any word on the issue, i found a workaround for Blazor Server but struggling to wait on async tasks when using WebAssembly. Currently the issue is holding back a prod release.
Hi any updates on this issue
I got this error and switched over to use MatSelect
instead. No error when using that component
Hi. I am using MatSelectItem in my project and it throws an error:
So I checked the examples on the demo page and opening the example in Fiddle threw me the same error: https://blazorfiddle.com/temp/1a3e8675-0e34-4f65-b628-fa4fb567bd74
But I detected that the error does not appear on the Demo site !!!! !!!
So I exclude some syntax problem or misuse of the component.
Any ideas what may be happening? Maybe some library version problem?
Thanks in advance.