syncOptions(first = false) {
        /** @type {?} */
        const values = this.values;
        /** @type {?} */
        const hasValue = values && values.length;
        /** @type {?} */
        const lastColumnIndex = values.length - 1;
        /** @type {?} */
        const initColumnWithIndex = (/**
         * @param {?} columnIndex
         * @return {?}
         */
        (columnIndex) => {
            /** @type {?} */
            const activatedOptionSetter = (/**
             * @return {?}
             */
            () => {
                /** @type {?} */
                const currentValue = values[columnIndex];
                if (!currentValue) {
                    this.$redraw.next();
                    return;
                }
                /** @type {?} */
                const option = this.findOptionWithValue(columnIndex, values[columnIndex]) ||
                    (typeof currentValue === 'object'
                        ? currentValue
                        : {
                            [`${this.cascaderComponent.nzValueProperty}`]: currentValue,
                            [`${this.cascaderComponent.nzLabelProperty}`]: currentValue
                        });
                this.setOptionActivated(option, columnIndex, false, false);
                if (columnIndex < lastColumnIndex) {
                    initColumnWithIndex(columnIndex + 1);
                }
                else {
                    this.dropBehindColumns(columnIndex);
                    this.selectedOptions = [...this.activatedOptions];
                    this.$redraw.next();
                }
            });
            if (this.isLoaded(columnIndex) || !this.cascaderComponent.nzLoadData) {
                activatedOptionSetter();
            }
            else {
                /** @type {?} */
                const option = this.activatedOptions[columnIndex - 1] || {};
                this.loadChildren(option, columnIndex - 1, activatedOptionSetter);
            }
        });
        this.activatedOptions = [];
        this.selectedOptions = [];
        if (first && this.cascaderComponent.nzLoadData && !hasValue) {
            return;
        }
        else {
            initColumnWithIndex(0);
        }
    }
/**
     * Make sure that value matches what is displayed in the dropdown.
     * @param {?=} first
     * @return {?}
     */
Make sure that value matches what is displayed in the dropdown.
Make sure that value matches what is displayed in the dropdown .
syncOptions(first = false) {
        const values = this.values;
        const hasValue = values && values.length;
        const lastColumnIndex = values.length - 1;
        const initColumnWithIndex = (
        (columnIndex) => {
            const activatedOptionSetter = (
            () => {
                const currentValue = values[columnIndex];
                if (!currentValue) {
                    this.$redraw.next();
                    return;
                }
                const option = this.findOptionWithValue(columnIndex, values[columnIndex]) ||
                    (typeof currentValue === 'object'
                        ? currentValue
                        : {
                            [`${this.cascaderComponent.nzValueProperty}`]: currentValue,
                            [`${this.cascaderComponent.nzLabelProperty}`]: currentValue
                        });
                this.setOptionActivated(option, columnIndex, false, false);
                if (columnIndex < lastColumnIndex) {
                    initColumnWithIndex(columnIndex + 1);
                }
                else {
                    this.dropBehindColumns(columnIndex);
                    this.selectedOptions = [...this.activatedOptions];
                    this.$redraw.next();
                }
            });
            if (this.isLoaded(columnIndex) || !this.cascaderComponent.nzLoadData) {
                activatedOptionSetter();
            }
            else {
                const option = this.activatedOptions[columnIndex - 1] || {};
                this.loadChildren(option, columnIndex - 1, activatedOptionSetter);
            }
        });
        this.activatedOptions = [];
        this.selectedOptions = [];
        if (first && this.cascaderComponent.nzLoadData && !hasValue) {
            return;
        }
        else {
            initColumnWithIndex(0);
        }
    }
syncOptions ( first = false ) { const values = this . values ; const hasValue = values && values . length ; const lastColumnIndex = values . length - 1 ; const initColumnWithIndex = ( ( columnIndex ) => { const activatedOptionSetter = ( ( ) => { const currentValue = values [ columnIndex ] ; if ( ! currentValue ) { this . $redraw . next ( ) ; return ; } const option = this . findOptionWithValue ( columnIndex , values [ columnIndex ] ) || ( typeof currentValue === 'object' ? currentValue : { [ ` ${ this . cascaderComponent . nzValueProperty } ` ] : currentValue , [ ` ${ this . cascaderComponent . nzLabelProperty } ` ] : currentValue } ) ; this . setOptionActivated ( option , columnIndex , false , false ) ; if ( columnIndex < lastColumnIndex ) { initColumnWithIndex ( columnIndex + 1 ) ; } else { this . dropBehindColumns ( columnIndex ) ; this . selectedOptions = [ ... this . activatedOptions ] ; this . $redraw . next ( ) ; } } ) ; if ( this . isLoaded ( columnIndex ) || ! this . cascaderComponent . nzLoadData ) { activatedOptionSetter ( ) ; } else { const option = this . activatedOptions [ columnIndex - 1 ] || { } ; this . loadChildren ( option , columnIndex - 1 , activatedOptionSetter ) ; } } ) ; this . activatedOptions = [ ] ; this . selectedOptions = [ ] ; if ( first && this . cascaderComponent . nzLoadData && ! hasValue ) { return ; } else { initColumnWithIndex ( 0 ) ; } }
Make sure that value matches what is displayed in the dropdown.
Make sure that value matches what is displayed in the dropdown .
/** @type {?} */ /** @type {?} */ /** @type {?} */ /** @type {?} */ /**
         * @param {?} columnIndex
         * @return {?}
         */ /** @type {?} */ /**
             * @return {?}
             */ /** @type {?} */ /** @type {?} */ /** @type {?} */