Page 1 of 1

How do I duplicate the appinline profile

Posted: 14 Apr 2020, 16:36
by princetoka
I duplicated the appinline profile. Js but whenever I click on one of it, the other opens too, please how do I fix this?

Re: How do I duplicate the appinline profile

Posted: 26 Apr 2020, 23:10
by merve7
Hi,
Could you check inlineProfileActive props for the inline profile? If both are the same, please change one of them and function. Like as;

Code: Select all

		this.onInlineProfileClick = this.onInlineProfileClick.bind(this);
		this.onInlineProfileClick2 = this.onInlineProfileClick2.bind(this);

Code: Select all

	<AppInlineProfile inlineProfileActive={this.state.inlineProfileActive} onInlineProfileClick={this.onInlineProfileClick}/>}
	<AppInlineProfile inlineProfileActive={this.state.inlineProfileActive2} onInlineProfileClick={this.onInlineProfileClick2}/>}

Code: Select all

	onInlineProfileClick(event) {
		this.inlineProfileClick = true;
		this.setState({inlineProfileActive: !this.state.inlineProfileActive});

		if(this.isSlim() && !this.isMobile()) {
			if (!this.menuClick) {
				this.setState({menuActive: false})

				this.hideOverlayMenu();
			}
			this.menuClick = false;
		}
	}
	onInlineProfileClick2(event) {
		this.inlineProfileClick = true;
		this.setState({inlineProfileActive2: !this.state.inlineProfileActive2});

		if(this.isSlim() && !this.isMobile()) {
			if (!this.menuClick) {
				this.setState({menuActive: false})

				this.hideOverlayMenu();
			}
			this.menuClick = false;
		}
	}