JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <td class="cant_formula numeric">
        0.007
        <input type="hidden" value="0.015" class="cant_formula" />
    </td>
</table>

JavaScript

$('td.cant_formula.numeric').contents()
    .filter(function() {
        return this.nodeType == 3; //Node.TEXT_NODE
    })
    .get(0).nodeValue = 'test';