Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to hide VToolbar #174

Closed
kavishgambhir opened this issue Apr 5, 2019 · 3 comments
Closed

Unable to hide VToolbar #174

kavishgambhir opened this issue Apr 5, 2019 · 3 comments

Comments

@kavishgambhir
Copy link

kavishgambhir commented Apr 5, 2019

How can I disable VToolbar inside the calendar component and use my own VToolbar with a router-view inside the VApp component?

@kavishgambhir
Copy link
Author

cc @ClickerMonkey

@ClickerMonkey
Copy link
Owner

Use the ds-calendar component instead of ds-calendar-app

@x7ian
Copy link

x7ian commented Aug 18, 2019

I wanted to be able to show or hide the toolbar according to some condition.
In order to do this, I had to modify the CalendarApp component.
First I added a new prop to it the following way:

useToolbar:
    {
      type: Boolean,
      default: true
    },

then I added a v-if condition to the v-toolbar component like this:

<v-toolbar app flat fixed
    v-if="useToolbar"
    class="ds-app-calendar-toolbar"
    color="white"
    :clipped-left="$vuetify.breakpoint.lgAndUp">

So now I can add a use-toolbar prop in my App.vue that shows or hides the toolbar:

<ds-calendar-app ref="app"
      :calendar="calendar"
      :read-only="readOnly"
      :use-toolbar="false"
      @change="saveState">

instead of false you can use a variable that can be then modified in a method if you want to be able to show or hide the toolbar based on a particular condition.

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

No branches or pull requests

3 participants