diff --git a/projects/ngx-dadata/src/lib/dadata-config.ts b/projects/ngx-dadata/src/lib/dadata-config.ts index 0d81f1a..eb38fb3 100644 --- a/projects/ngx-dadata/src/lib/dadata-config.ts +++ b/projects/ngx-dadata/src/lib/dadata-config.ts @@ -41,6 +41,7 @@ export interface DadataConfig { locations?: Location[]; locationsBoost?: Location[]; bounds?: Bounds; + restrict_value?: boolean } export const DadataConfigDefault: DadataConfig = { diff --git a/projects/ngx-dadata/src/lib/ngx-dadata.service.ts b/projects/ngx-dadata/src/lib/ngx-dadata.service.ts index ed4760c..8ddd61e 100644 --- a/projects/ngx-dadata/src/lib/ngx-dadata.service.ts +++ b/projects/ngx-dadata/src/lib/ngx-dadata.service.ts @@ -38,10 +38,11 @@ export class NgxDadataService { {}, {query: value}, {count: config?.limit}, - {location: config?.locations}, - {location_bust: config?.locationsBoost}, + {locations: config?.locations}, + {location_boost: config?.locationsBoost}, {from_bound: config?.bounds?.fromBound}, - {to_bound: config?.bounds?.toBound} + {to_bound: config?.bounds?.toBound}, + {restrict_value: config?.restrict_value?} ); return this.http.post('https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/' + type, body, httpOptions); }