EvolvedWeb / evowc

Evolved Web Components
MIT License
8 stars 0 forks source link

Add ability to update bindings of an object field #103

Open intervalia opened 5 months ago

intervalia commented 5 months ago

Describe the solution you'd like It would be great if we could have the ability to update bindings if an object property changes.

<component tag="test-item" :data="obj">
  <template>
    <a :href="data.url">
      <img :src="data.imgUrl" :alt="data.title" loading="lazy" decoding="async" />
    </a>
    <div>
      <a class="category" :href="data.categoryUrl" :text="data.category" />
      <a :href="data.url" :html="data.titleTag" />
      <p class="summary" :text="data.summary" />
      <a class="author" :href="data.authorUrl" :title="data.authorName" />
      <div class="date" :text="data.date|^toDate" data-date-style="long" />
    </div>
  </template>
</component>

In the example above we need to make sure that we can bind all of the data values into the template and then be able to change the bound values as the sub properties change.

This may require a proxy for obj types.

We need to do research and then create one or more issues to cover the code.