#102236
YavorDashev
Member

Hi Trist B,
I have create a quick code snippet showcasing how to add the event listeners so that it may simulate the ‘closeColumnDialog’ and ‘openColumnDialog’ events.

	 componentDidMount() {
			const addColumnButton = document.querySelector('.smart-add-new-column');
			addColumnButton.addEventListener('click', () => {
				console.log('opening column dialog');
				setTimeout( () => {
					let dialogWindow = document.querySelector('.smart-window'),
						closeButtons = dialogWindow.querySelectorAll('.smart-cancel-button');
						for(let i=0; i< closeButtons.length; i++) {
							closeButtons[i].addEventListener('click', () => {
								console.log('closing dialog')
							});
						}
				},100)
			});
	 }

Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/