Every line of 'button onclick' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
10 onClick() { 11 console.log('clicked'); 12 }
116 _onClick(event: Event): void { 117 const { 118 button, 119 onClick 120 } = this.props; 121 const { 122 enabled, 123 unclickable 124 } = button; 125 126 if (enabled && !unclickable && onClick) { 127 onClick(event); 128 } 129 }
19 onClick() { 20 const { onClick } = this.props; 21 onClick && onClick(); 22 }
62 public onClick(event: React.MouseEvent) { 63 this.props.onClick ? this.props.onClick(event) : null; 64 }
11 onClick(event) { 12 const { disabled, onClick } = this.props; 13 14 if (disabled) { 15 event.preventDefault(); 16 return; 17 } 18 19 if (onClick) { 20 onClick(event); 21 } 22 }
11 handleClick(event) { 12 const { onClick } = this.props 13 onClick(event) 14 }
27 handleClick(event) { 28 this.props.onClick(event); 29 }
150 onClick(event: any): void { 151 if (this.disabled) { 152 event.preventDefault(); 153 event.stopImmediatePropagation(); 154 } else { 155 this.click.emit(event); 156 } 157 }
7 onClick(e: SyntheticEvent): void { 8 if (!this.props.loading) { 9 this.props.onClick && this.props.onClick(e); 10 } 11 }
212 onClick(event: MouseEvent) { 213 if (this.args.onClick) { 214 //throw error on console 215 assert( 216 'onClick of ember-elements must be a function', 217 typeof this.args.onClick === 'function' 218 ); 219 220 // disabled button d'nt have a action 221 if (!this.disabled && this.args.onClick) { 222 this.args.onClick(event); 223 } 224 } 225 }