Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was 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

@cbelden

Description

@cbelden

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions