Vue-material: [Feature Request] Allow putting md-input inside of a md-toolbar

Created on 24 Jan 2017  路  5Comments  路  Source: vuematerial/vue-material

Currently, if you want to put a md-input inside of a toolbar, you end up with unexpected behavior:

image

What I would expect, is something more along the lines of:

image

The issues that I see here are:

1) The input needs to theme appropriately.
2) By default, inside a toolbar, it should set itself to flex: 1, or similar.

While I'm not against having to do _some_ work to do this, it's a natural scenario when you want to filter the contents of a list to put it in a card, with a toolbar. Other CSS frameworks make this very easy, I'd like to see the same level of ease in VueMaterial.

improvement

Most helpful comment

Can we get an official example of input inside toolbar? Also, how would we do this for the dense toolbar

All 5 comments

You're correct. Should have a better styling. I will fix that.
I'm going to create a search-bar component too, but on the future.

The input needs to theme appropriately. By default, inside a toolbar, it should set itself to flex: 1, or similar.

I don't think so. You can still use md-layout inside the md-toolbar, for example.

<md-layout md-tag="md-toolbar></md-layout>
<!-- or -->
<md-toolbar>
  <md-input-container class="md-flex"></md-input-container><!-- This is actually a hack, but will work -->
</md-toolbar>

Thanks!

I don't think so. You can still use md-layout inside the md-toolbar, for example.

@marcosmoura It was only after thinking about this that I realized that the answer really is to just use md-layout inside the toolbar. Perhaps an example of that added to the toolbar docs?

Sure. I will add that. But the themes still doesn't match. I will fix that an then a return back with the example. Thank you!

Can you update the code example on the website? I'm seeing an input field on the first example, but the code doesn't seem to have been updated.

screen shot 2017-04-19 at 2 27 39 pm
screen shot 2017-04-19 at 2 29 49 pm

Can we get an official example of input inside toolbar? Also, how would we do this for the dense toolbar

Was this page helpful?
0 / 5 - 0 ratings