I’ve created a content filter view by extending Ember.TextField and I’d like to have a little X appear in the right side of the field when there is content in that field, and when clicked, will clear the field contents.
Instead of using a jQuery plugin, I would add a “clear” action that sets the property bound to your TextField to the empty string. Here’s an example wrapping the functionality in an {{input-with-clear}} component: Clear action in text input field - JSFiddle - Code Playground
@rox163 - The best way to avoid the text from going behind the clear button is apply padding to the inner text content. For example, try putting padding-right: 25px on the text box. Hope this helps!
TrailHacker
March 10
@rox163 - The best way to avoid the text from going behind the clear button is apply padding to the inner text content. For example, try putting padding-right: 25px on the text box. Hope this helps!
Visit Topic or reply to this email to respond
In Reply To
rox163
March 10
How would you prevent the text from going underneath the clear button?
Visit Topic or reply to this email to respond
To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences