Svelte does not support two-way-data-binding with custom elements when the property name is value

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
42/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Ambito
documentation

Direzione di ricerca

Start with the README and review how it currently describes Svelte integration, then read the linked Svelte issue for the reported binding limitation. Done means the README clearly documents that two-way binding with a custom element whose property is named value does not work as expected, along with the relevant workaround or limitation.

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

Descrizione

Hey,

I just read this blog post and saw this repository linked there. Nice to see this movement and progress for ui5 webcomponents.

Good job guys!

I tried to use ui5 webcomponents with svelte two years ago and stumpled on some points.

But all in all it works really nice!

I think probably you should mention some points in README, which are currently not supported.

Such as two way data binding on input-element is not working as expected. See: https://github.com/sveltejs/svelte/issues/4838

<script>
	import "@ui5/webcomponents/dist/Button";
	import "@ui5/webcomponents/dist/Input";
	export let name = world;
</script>

<style>
  main {
    font-family: sans-serif;
    text-align: center;
  }
</style>

<main>
<h1>Hello {name}!</h1>
<ui5-button>Hello {name}</ui5-button>
<!-- databind implement by myself -->
<ui5-input value={name} on:input={(e) => name = e.target.value}></ui5-input>

<!-- svelte "native" two-way-databinding -->
<!-- comment this out to see the problem-->
<!--<ui5-input bind:value={name}></ui5-input>-->
</main>
Lingua principale
Svelte
Stelle
28
Fork
2
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 UI5/sample-webcomponents-svelte

Tutte le issue di UI5/sample-webcomponents-svelte

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.