Que no sean INPUTS #33

Closed
opened 2026-01-23 21:04:28 +00:00 by AlexRG · 2 comments
Owner

Tienen que ser contentEditable por eso se corta el nombre, se puede hacer más grande el input pero es mejor que sea contentEditable

image.png image.png
Tienen que ser contentEditable por eso se corta el nombre, se puede hacer más grande el input pero es mejor que sea **contentEditable** <img width="1022" alt="image.png" src="attachments/cf2258cb-a100-4e49-a370-b14c4bd8d9fb"> <img width="958" alt="image.png" src="attachments/7fd7a92a-330a-42d3-8341-9bbf27a5293f">
AlexRG added the bug label 2026-01-23 21:04:38 +00:00
roberto.silva was assigned by AlexRG 2026-01-23 21:04:46 +00:00
Author
Owner

Que no sean inputs debe ser contentEditable

image.png Este NO ES EL TRUCO. El truco es usar contentEditable
    <input
      type="text"
      value={textValue}
      // El truco es usar el atributo "size" o calcular el ancho dinámicamente
      style={{ width: `${Math.max(textValue.length, 1)}ch` }}
      onChange={(e) => onSave(e.target.value)}
      onBlur={(e) => onSave(e.target.value)}
      className={`border-none bg-transparent outline-none focus:ring-2 focus:ring-blue-400 ${className ?? ''}`}
    />

c15e2f941d

Que no sean inputs debe ser contentEditable <img width="1069" alt="image.png" src="attachments/c19eaed9-f5b4-4a4d-a563-4fe1aed143f1"> Este NO ES EL TRUCO. El truco es usar contentEditable ```jsx <input type="text" value={textValue} // El truco es usar el atributo "size" o calcular el ancho dinámicamente style={{ width: `${Math.max(textValue.length, 1)}ch` }} onChange={(e) => onSave(e.target.value)} onBlur={(e) => onSave(e.target.value)} className={`border-none bg-transparent outline-none focus:ring-2 focus:ring-blue-400 ${className ?? ''}`} /> ``` https://github.lci.ulsa.mx/Guillermo.Arrieta/acad-ia-2/commit/c15e2f941dcda3c29e3bbf3ded66086b38f2e467
AlexRG reopened this issue 2026-01-27 20:54:05 +00:00
Author
Owner

Esto pasa cuando usas input y no contentEditable
image.png

Esto pasa cuando usas input y no contentEditable <img width="1193" alt="image.png" src="attachments/e112418a-ea8e-45fd-990b-5ea3e994905e">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Guillermo.Arrieta/acad-ia-2#33