diff --git a/src/api/getSuggestions.ts b/src/api/getSuggestions.ts index dbc7eb7..b6c2fed 100644 --- a/src/api/getSuggestions.ts +++ b/src/api/getSuggestions.ts @@ -25,6 +25,7 @@ async function getSuggestions({ language: locationOptions.language, locations: locationOptions.locations, locations_boost: locationOptions.locationsBoost, + restrict_value: locationOptions.restrictValue || false, }; try { const { diff --git a/src/components/VueDadata.vue b/src/components/VueDadata.vue index 4c88d9c..01ad91c 100644 --- a/src/components/VueDadata.vue +++ b/src/components/VueDadata.vue @@ -77,6 +77,7 @@ export default class VueDadata extends Vue { language: 'ru', locations: [], locationsBoost: [], + restrictValue: false, }), }) public readonly locationOptions!: LocationOptions; diff --git a/src/types/LocationOptions.ts b/src/types/LocationOptions.ts index a756c26..c2499e8 100644 --- a/src/types/LocationOptions.ts +++ b/src/types/LocationOptions.ts @@ -2,4 +2,5 @@ export default interface LocationOptions { language: string; locations: Array; locationsBoost: Array; + restrictValue?: boolean; } diff --git a/src/types/Suggestion.ts b/src/types/Suggestion.ts index fc1366e..755af96 100644 --- a/src/types/Suggestion.ts +++ b/src/types/Suggestion.ts @@ -18,4 +18,5 @@ export interface SuggestionPayload { language: string; locations: Array; locations_boost: object; + restrict_value: boolean; }