Comments (1)
Just for label or description you can use the resolver for label or description and use your Model however you want.
For editing or whatever you can check if the Mask Property helps.
public TestModel Test { get; set; } = new();
public class TestModel
{
public Gender? Gender { get; set; }
public string Text { get; set; }
}
public enum Gender
{
Male,
Female,
Other
}
private void Configure(ObjectEditMeta<TestModel> meta)
{
meta.Property(m => m.Text)
.WithLabelResolver(i => Test.Gender?.ToString() + "_ Text")
.WithDescriptionResolver(i => Test.Gender?.ToString())
.WithAttributesIf<TestModel, MudTextField<string>>(m => m.Gender == Gender.Male, f => f.Mask = new PatternMask("###-##-##"))
.WithAttributesIf<TestModel, MudTextField<string>>(m => m.Gender == Gender.Female, f => f.Mask = new PatternMask("###-##-##"));
}
from mudblazor.extensions.
Related Issues (20)
- Out dated Blazored.FluentValidation HOT 1
- [Bug]: Getting Microsoft.JSInterop.JSException: 'Cannot read properties of null (reading 'innerText') when trying to show a dialog HOT 2
- [Bug]: Dialogs Stop Working on 2nd client HOT 10
- [Bug]: DialogService.ShowEx results in Microsoft.JSInterop.JSDisconnectedException after page refresh (as of 1.7.64) HOT 7
- [Bug]: MudExChipSelect focus issue HOT 4
- [Bug]: MudExUploadEdit totally breaks application. HOT 5
- [Bug]: FileDisplayZip styles isn't applied until you refresh(?) the component HOT 4
- [Bug]: Multiple non-modal dialogs closing issue HOT 2
- [Bug]: MudExFileDisplay won't load file from Stream HOT 22
- [Bug]: no value for property MudExConfiguration for MudExFileDisplayZip HOT 8
- [Bug]: Dialog flickers before actual showing animation HOT 5
- [Bug]: Unable to resolve service for type 'System.Net.Http.HttpClient' while attempting to activate 'MudBlazor.Extensions.Services.MudExFileService' HOT 3
- Ability to click drop are to upload file HOT 1
- Loading icon for files while uploading HOT 2
- Add MudBlazor form validation integration to MudExUploadEdit HOT 2
- [Bug]: MudExPopover does not appear to properly dispose of JS click event listener when re-rendering the component HOT 5
- [Bug]: MudExUploadEdit Crashes Dialogs HOT 2
- Callback for when data is available for files in MudExUploadEdit HOT 2
- Add more descriptive code samples HOT 3
- MudExObjectEditForm: text (string) RenderWith dropdown (select) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mudblazor.extensions.