Comments (2)
Your attempting to do something that's not supported even with the base InputText. While I could make this work by adding a preventdefault parameter and attribute for each event type. It will get super messy as there are a lot of events. Until they have a better way of passing down the argument predicting all the possible uses that might be needed doesn't seem reasonable. The fact Microsoft hasn't even added a method to support this in their input components. Tells me that they intend you to drop out of the component when trying to use more advanced event binding.
From what you provided as an example, I'm seeing other errors that would prevent that from working anyways. I recommend dropping down to the base HTML input tag and doing.
<input type="text" class="form-control" @onkeydown="KeyDown" @onkeydown:preventDefault="shouldPrevent">
or if you're just intending just to get the value right away, you can do something like
<BSInput InputType="InputType.Text" ValidateOnInput="true" ValueChanged="@((string txt) => OnValueChanged(txt))" value="@Modal.MiddleName" ValueExpression="@(() => Modal.MiddleName)" />
private void OnValueChanged(string e)
{
Modal.MiddleName = e;
Console.WriteLine(e);
}
from blazorstrap.
Thanks.
do it another way.
from blazorstrap.
Related Issues (20)
- Modal fails to close and throws promise error HOT 8
- BSModal Nesting/Multi-Modal Support Request HOT 12
- JSException at addEventListener HOT 2
- Tooltips, Popover, Modal, Offcanvas HOT 1
- BSOffCanvas: Overflow hidden and some styling wont reset on OffCanvas hidden HOT 2
- Known Issue: Mouseover Dropdowns HOT 1
- BSCol Documentation is wrong (ColumnXL missing; ColumnLarge is repeated). HOT 1
- Documentation on how to set a theme? HOT 2
- Prerelease docs missing HTML HOT 3
- Unhandled Error for property BlazorStrapSrc HOT 3
- How to set focus on BSButton HOT 4
- How do I call Toggle for a modal? HOT 3
- Feature Request: MultiSelect Select/Dropdown HOT 1
- Modal Fade show not working HOT 2
- BSDataTable HOT 3
- Feature Request: FluentValidation in BSForm Edit Context HOT 11
- Prevent Default/Stop Enter from Submitting HOT 1
- InvalidOperationException: The render handle is not yet assigned in BlazorStrap's BSModalBase on Modal.ShowAsync()
- Question: NotifyFieldChanged in BlazorStrapInputBase HOT 1
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 blazorstrap.