Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Input components do not use `value=""` when the form data has a value

Aperta
#570 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
elixir
Ambito
frontend

Direzione di ricerca

Start by reproducing the issue with a TextInput whose value is set to an empty string while the form data contains a value, then compare the result with Phoenix.HTML.Form behavior. Trace the Surface input component path and add coverage showing that the rendered input includes value=""; done means the component matches the expected form behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

How to reproduce it

  1. Have some data in the field being rendered
  2. <TextInput value="" />

The rendered does not have value="" but the value from the form data / changeset.
The functions in Phoenix.HTML.Form do not show this behaviour.

The behavior you expected

Expected the components to behave like Phoenix.HTML.Form.

Your Environment

Surface: v0.7.0
LiveView: v0.17.6
Elixir: v1.13.0

Edited because HTMLish content needs to be fenced, otherwise <TextInput... becomes invisible ;)

Lingua principale
Elixir
Stelle
2.1k
Fork
146
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di surface-ui/surface

Tutte le issue di surface-ui/surface

Issue simili

Altre issue su Elixir

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.