cferdinandi / reef

A lightweight library for creating reactive, state-based components and UI.

Home Page:https://reefjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Input fields not updated to reflect data changes

nbullock opened this issue · comments

Test case: https://codepen.io/troglet/pen/XWzKYba

It looks like there's possibly an issue with input field values in the test case above - clicking on the items in the left table sets the selectedItem property of the store, and the right panel is rendered. The heading is correct, but the 'Name' and 'Timezone' input fields remain at whatever you first clicked on.

My workaround in the production code I'm writing is to set selectedItem to 0 in the selectItem() function, call render() and then set it to what I want, which isn't ideal but works.

Using reef 11.0.1 in Chrome Version 97.0.4692.99 on Windows 10 (also tried Firefox 93.0.3)

Presumably the same thing seems to happen with the disabled attribute on buttons.

Per the linked article, this is handled with the @ and # prefixes in your template.