Skip to content

Commit

Permalink
fix(gmap-vue): update mappedProps name
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoazh committed Nov 23, 2021
1 parent af5da48 commit f439eab
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/gmap-vue/src/components/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
getPropsValues,
bindProps,
} from '../utils/helpers';
import { autocompleteProps } from '../utils/mapped-props-by-map-element';
import { autocompleteMappedProps } from '../utils/mapped-props-by-map-element';
export default {
props: {
Expand Down Expand Up @@ -93,7 +93,7 @@ export default {
}
const autocompleteOptions = {
...getPropsValues(this, autocompleteProps),
...getPropsValues(this, autocompleteMappedProps),
...this.options,
};
Expand All @@ -102,7 +102,7 @@ export default {
autocompleteOptions
);
bindProps(this, this.$autocomplete, autocompleteProps);
bindProps(this, this.$autocomplete, autocompleteMappedProps);
// IMPORTANT: To avoid paying for data that you don't need,
// be sure to use Autocomplete.setFields() to specify only the place data that you will use.
Expand Down
29 changes: 27 additions & 2 deletions packages/gmap-vue/src/utils/mapped-props-by-map-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* for those properties that are not extraneous to Vue.
*/

export const autocompleteProps = {
export const autocompleteMappedProps = {
bounds: {
type: Object,
},
Expand All @@ -34,6 +34,31 @@ export const autocompleteProps = {
},
};

export const circleMappedProps = {
center: {
type: Object,
twoWay: true,
required: true,
},
radius: {
type: Number,
twoWay: true,
},
draggable: {
type: Boolean,
default: false,
},
editable: {
type: Boolean,
default: false,
},
options: {
type: Object,
twoWay: false,
},
};

export default {
autocompleteProps,
autocompleteMappedProps,
circleMappedProps,
};

0 comments on commit f439eab

Please sign in to comment.