JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="search_bar" />

JavaScript

$('#search_bar').keyup(function(e) {
    if(e.keyCode == 13 && !e.shiftKey) { // enter/return
        e.preventDefault();
        console.log("xx");
    }
})