react 特定要素以外をクリックした場合 by tetsu on 2018年11月20日 with コメントはまだありません if(e.target.closest(“#popup”) == null && e.target.closest(“#popup_links”) == null) { this.setState({popup:”none”}); } 例えばこんなん。 これでid=”popup”とid=”popup_links”以外の要素をクリックした場合という挙動ができる。 メモ
Leave a Reply