JSFiddle - React, Tailwind, and code Playground
HTML
A: <input type="text" name="a" id="a">
B: <input type="text" name="b" id="b">
JavaScript
$("#a").bind('input',function(){
if(! $(this).val() == ''){
$('#b').prop('disabled', true);
} else {
$('#b').prop('disabled', false);
}
});
$("#b").bind('input',function(){
if(! $(this).val() == ''){
$('#a').prop('disabled', true);
} else {
$('#a').prop('disabled', false);
}
});