Commit d5702151 authored by alish's avatar alish
Browse files

feat: fix create product form

parent 7abe9338
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -169,6 +169,11 @@ export class BasicInfoFormComponent implements OnDestroy, OnInit {
			.subscribe((v) => {
				if (v !== this._productLocalesService.currentLocale) {
					this._productLocalesService.currentLocale = v;

					if (!this.product) {
						this.images.forEach((i) => (i.locale = v));
					}

					this.setValue(this.product);
				}
			});
@@ -347,7 +352,7 @@ export class BasicInfoFormComponent implements OnDestroy, OnInit {
	}

	private _setDefaultLocaleValue() {
		this.locale.setValue('en-US');
		this.locale.setValue(this._translateService.currentLang || 'en-US');
	}

	private _bindFormControls() {