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

Add template option to add class to md-input-container #46

Open
valent-ex opened this issue Jun 24, 2016 · 3 comments
Open

Add template option to add class to md-input-container #46

valent-ex opened this issue Jun 24, 2016 · 3 comments

Comments

@valent-ex
Copy link

Hi!

I need to add an md-block class to md-input-container in order to make input wider, as seen in this demo: https://material.angularjs.org/HEAD/demo/input
Looks like there is no such template option currently.

Thanks.

@jarvelov
Copy link

jarvelov commented Jun 28, 2016

+1

I also need a solution here. As of now I've just edited the source to include a way to set the class attribute.

<md-input-container class="{{to.inputContainer.className}}"  md-theme="{{to.theme}}">
    <formly-transclude></formly-transclude
</md-input-container>

and in the field config

...
{
      key: 'field',
      type: 'input',
      templateOptions: {
            label: 'Field name',
            inputContainer: {
                  className: 'md-block md-icon-float md-icon-left'
            }
      }
}
...

Not ideal by any means. Would really appreciate an official stance by the maintainer on how to implement this feature. If my solution would suffice I can submit a pull request.

@williamoliveira
Copy link

You can overwrite wrappers, just create a new one with the same name and an "overwriteOk: true" attribute

@felipeplets
Copy link

I like @jarvelov solution and recommend a PR with that.

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

No branches or pull requests

5 participants