raychenfj / ion-multi-picker

Multi Item Picker - An Ionic Custom Multi Picker Component
https://raychenfj.github.io/ion-multi-picker/
Other
236 stars 103 forks source link

Type 'string' is not assignable to type 'boolean'. #82

Closed shuodongLou closed 6 years ago

shuodongLou commented 6 years ago

The component works great on dev testing but only have this issue popped out when compiled with ngc by running: ./node_modules/.bin/ngc under the ionic project root:

[SCREEN] Error at E:/ionic_workspace/FiresseProj/node_modules/ion-multi-picker/dist/compo nents/multi-picker/multi-picker.d.ts.MultiPicker.html(2,45): Type 'string | true ' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'boolean'.

So in the file: '.../node_modules/ion-multi-picker/dist/components/multi-picker/multi-picker.html': there is this line having the issue:

[SOURCE] <div class="multi-picker-text" *ngIf="!placeholder || _text">{{_text}}

the variable 'placeholder' is defined as a string in the .ts file: '.../node_modules/ion-multi-picker/dist/components/multi-picker/multi-picker.d.ts':

[SOURCE] export declare class MultiPicker implements AfterContentInit, ControlValueAccessor, OnDestroy { private _form; private _item; private _pickerCtrl; _disabled: any; _labelId: string; _text: string; _fn: Function; _isOpen: boolean; _value: any; _pickerCmp: PickerCmp; _pickerColumnCmps: PickerColumnCmp[]; _isDependent: boolean; _sequence: number[]; _originSelectedIndexes: number[]; id: string; cancelText: string; doneText: string; resetText: string; multiPickerColumns: MultiPickerColumn[]; separator: string; placeholder: string; <<--------------------------------------(here it is) showReset: Boolean; ionChange: EventEmitter; ionCancel: EventEmitter; constructor(_form: Form, _item: Item, _pickerCtrl: PickerController);

So, maybe a small change is needed to improve.... right at the moment I don't know how to make the changes directly to the above files effective... I'm trying a prod build. Thanks for the hard work.