Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Any plans for adding a paper-input that expands as user types #198

Open
cbelden opened this issue May 12, 2016 · 0 comments
Open

Any plans for adding a paper-input that expands as user types #198

cbelden opened this issue May 12, 2016 · 0 comments

Comments

@cbelden
Copy link

cbelden commented May 12, 2016

We've come across the need for an input element that will auto-grow horizontally as the user types (ie we want to fit the input element to the value). This is for a feature similar to Drive's document edit view where the user can update the name of the document inline:

image

Are there any plans to implement an input element that accomplishes this? If not, is there a way we can get this to work with existing Polymer components? As of now, we're planning to create our own custom element that implements the technique highlighted in the accepted answer from this stackoverflow post:
http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript

The custom component will wrap a paper-input and will place the desired text into a div that's rendered off screen, measure the width of that div, and assign the width to the paper-input.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant