ngx-chips
ngx-chips copied to clipboard
Type of theme in module/defaults.ts is not properly set
PLEASE MAKE SURE THAT:
- you searched similar issues online (9/10 issues in this repo are solved by googling, so please...do it)
- you provide an online demo I can see without having to replicate your environment
- you help me by debugging your issue, and if you can't, do go on filling out this form
I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] support request/question
Notice: feature requests will be ignored, submit a PR if you'd like
Current behavior
The type of theme in module/defaults.ts is not properly set, and will raise error when assigning default theme:
The expected type comes from property 'theme' which is declared here on type '{ separatorKeys?: string[]; separatorKeyCodes?: number[]; maxItems?: number; placeholder?: string; secondaryPlaceholder?: string; validators?: ValidatorFn[]; asyncValidators?: AsyncValidatorFn[]; onlyFromAutocomplete?: boolean; ... 24 more ...; animationDuration?: { ...; }; }'
Expected behavior
Change
theme: '';
to
theme: string;
will make things work again.
Minimal reproduction of the problem with instructions (if applicable)
import { TagInputModule } from 'ngx-chips';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
TagInputModule.withDefaults({
tagInput: {
theme: 'dark'
}
});
@NgModule({
declarations: [],
imports: [CommonModule, TagInputModule],
exports: [TagInputModule]
})
export class NgxChipsModule {}
What do you use to build your app?. Please specify the version
Angular version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.3.20
Node: 13.2.0
OS: darwin x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.20
@angular-devkit/build-angular 0.803.20
@angular-devkit/build-optimizer 0.803.20
@angular-devkit/build-webpack 0.803.20
@angular-devkit/core 8.3.20
@angular-devkit/schematics 8.3.20
@angular/cdk 8.2.3
@angular/cli 8.3.20
@angular/material 8.2.3
@ngtools/webpack 8.3.20
@schematics/angular 8.3.20
@schematics/update 0.803.20
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2
ngx-chips version:
2.1.0
Browser: [all]