Comments (10)
- 1 for this. Ive run into the exact same problem.
the "autocomplete" class on that div is specific enough to customise elements within, a way to add class on the input field would be much handier.
from allmighty-autocomplete.
Okay, maybe'it would be good if the class would be on both? On the input
and the outer div
from allmighty-autocomplete.
That wouldn't make sense to me... couldn't you just target the input if the outer div had a class?
autocomplete > input
from allmighty-autocomplete.
@JustGoscha sounds fine.
@chesleybrown you can do that, the issue here is bootstrap has classes which we would like to apply to the input field
from allmighty-autocomplete.
@chesleybrown Yes, but it's not optimal.
This is DRY-er and stays synchronised with the styles in bootstrap:
<input class="form-control" ... />
<input class="form-control input-lg" ... />
<!--- N other custom inputs -->
Against this:
.autocomplete input {
/* all the properties in .form-control */
}
.different .autocomplete input {
/* overrides such as .input-lg */
}
/* N other customisations */
<input ... />
<input ... />
<!--- N other inputs -->
Which it's a bit harder to maintain and doesn't .
How about this?
<autocomplete
attr-class="wrapper-class"
attr-id="wrapper-id"
attr-input-class="form-control input-lg"
attr-input-id="input-id"
...
></autocomplete>
from allmighty-autocomplete.
@davidmh, @chesleybrown, @JustGoscha
The wrapping div already has 'autocomplete' on there as a class. Do you have an example where using attr-class on that wrapping div to add a second class is advantageous?
from allmighty-autocomplete.
Nop, it's just to make it backwards compatible. Maybe someone already deployed something using this directive.
Those attributes could be marked as deprecated to warn about future deletion or simply removed. They are not really relevant anymore.
Edit:
And attr-input- seems a bit more explicit.
from allmighty-autocomplete.
@davidmh Ok, let's do it, just make sure it's still optional an works without 😉
Also update the documentation in the README.md, whoever makes the change 😃
from allmighty-autocomplete.
I'm dependant on a fix so ill go ahead and do it
from allmighty-autocomplete.
See: #20
Once verified could you plus update the bower version so I cna start using it?
from allmighty-autocomplete.
Related Issues (20)
- Not losing focus
- Support ng-disabled
- Pass id into on-type
- work like gmail or another email client
- Is it possible to show all list on initial focus or when suggestion is null?
- ng-enter search
- Closes the scrollable list of items if you click on scroll button HOT 2
- Read-Only & Disabled?
- suggestion problem
- Doesn't with array of objects HOT 1
- Add input-type=search (configureable)
- Disable spellcheck on mobile devices
- want to clear value in input type HOT 1
- How i can get the value ?
- tabindex not working
- Can multiple select?
- How I use ng-change?
- what modification required for using within ng-repeat
- getting console error on typing in autocomplete text box HOT 1
- any body implemented Add new item when no result found 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 allmighty-autocomplete.