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

Component should extend from Vuetify Autocomplete component #119

Closed
Kocal opened this Issue Feb 2, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@Kocal
Copy link
Owner

Kocal commented Feb 2, 2019

https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VAutocomplete/VAutocomplete.js

By doing this, we will never need to add new props and pass them manually to <v-autocomplete> component, so we will be able to remove this:

disabled: {
  type: Boolean,
  default: false,
},
required: {
  type: Boolean,
  default: false,
},
requiredMessage: {
  type: String,
  default: 'You must select a place',
},
rules: {
  type: Array,
  default() {
    return [v => (v && v.value !== '') || this.requiredMessage];
  },
},
label: {
  type: String,
  default: '',
},
@Kocal

This comment has been minimized.

Copy link
Owner Author

Kocal commented Feb 3, 2019

It does not seems possible because of styles being imported aside JS.

Maybe use a directive directly on <v-autocomplete>? E.g.: <v-autocomplete v-algolia-places="{ countries: ['fr', 'en'] }">

@axlf

This comment has been minimized.

Copy link
Contributor

axlf commented Feb 7, 2019

That would be great. It would open up, to validate the v-autocomplete field, and show some error messages.

@Kocal

This comment has been minimized.

Copy link
Owner Author

Kocal commented Feb 7, 2019

Yep that would be awesome. 👍

I think I will go for the directive

@Kocal

This comment has been minimized.

Copy link
Owner Author

Kocal commented Feb 8, 2019

Or in fact, maybe we can keep the component and pass all props/events to Vuetify Autocomplete? Like this <v-autocomplete v-bind="$props" v-on="$events">?

With the directive, I can't update Vuetify Autocomplete like I want, some directive's properties are read only (there is a warning in the docs and in the console)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment