Comments (6)
The ember naming convention would make it appendAddon
.
I don't think the proposed solution really fits with emberjs. Anything can be set, from text to buttons.
So it'd require to be able to set a view as the add-on.
from ember-bootstrap.
The reason why I was asking that it be set with the TextField
, is that I cannot do something like this:
<div class="input-append">
{{view Bootstrap.Forms.TextField valueBinding="price"}}
<span class="add-on">$</span>
</div>
because ember-bootstrap
will wrap the <input>
tag with bootstrap
markup, like control-group
. So the add-on
span
will not work.
To make this work, the implementation must be somewhere in ember-bootstrap
, mustn't it?
from ember-bootstrap.
@siovene I don't know if this would be used commonly enough to warrant adding the option.
I suggest creating a custom view in your app. Off the top of my head
javascript
Bootstrap.Forms.AppendedTextField = Bootstrap.Forms.Field.extend({
template: Ember.Handlebars.compile([
'{{view view.labelView viewName="labelView"}}',
'
'
' {{view view.inputField viewName="inputField"}}',
' {{view.appendAddon}}',
'
' {{view view.errorsView}}',
'
});
Maybe worth documenting somewhere though
from ember-bootstrap.
Thanks for the suggestion, I'll do that. Perhaps it's not common, but it would be nice if ember-bootstrap
provided it.
from ember-bootstrap.
My main problem with ember-bootstrap providing it is that it would require every non-prepended input i.e. the vast majority of them to have to process whether or not they have the property. Maybe there's a better way to do it though.
from ember-bootstrap.
I'm closing this as it won't be implemented as proposed.
If you want to propose an alternative, please create a discussion in our newly created google group.
from ember-bootstrap.
Related Issues (20)
- Table Sorting not working for fixed header scrolling table
- Ember-bootstrap added to twitstrap resources
- ISO8601Date error in Bootstrap.DatePicker HOT 1
- [enhancement] Add missing bower.json.
- Move Readme contents
- addon does not import bootstrap.js file.
- Unable to install any 1.0.0 version with npm HOT 1
- Refer to active project with the same name
- navlist bind to model HOT 1
- Alert Message not working HOT 4
- Button Group is not supported HOT 3
- Compiled files HOT 4
- Can't set templateName of custom bodyViewClass of ModalPane HOT 5
- how to use typeAhead? HOT 2
- use datepicker Uncaught TypeError? HOT 1
- Bootstrap V3 support HOT 1
- ISO8601Date is not defined HOT 2
- no such file to load -- bundler/setup HOT 1
- Add dist folder to repo? HOT 4
- select doesn't seem to style properly
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 ember-bootstrap.