Repository navigation
1.5.9 is a fix release with seventeen fixes, new development warnings, and five changes.
Four of the fixes are for .min.js builds, which behaved differently from a development build. The properties the framework sets on elements no longer replace a custom element's own members, so a Shoelace <sl-dialog> with a data-bind-attr binding opens. A child prop fed by a parent's computed that reads a store through wildflower.getStore(), with no subscribe: block, updates when the store changes. wildflower.startBatch() is defined, and wildflower.config({ useWfPrefixOnly: true }) takes effect.
In every build, a store no longer keeps a destroyed component in memory when one of the component's computeds read the store. A prop from a parent's computed has its value on the first render when the framework's script tag is at the end of the body. A getter or setter on a class instance in state is reactive. In bindings, ??, ?., typeof, in, and items[index] work without parentheses, and data-bind-attr sets checked and value as properties on form controls.
In a list, a null or undefined entry renders an empty row, and a row is made again from the matching template when its data-template-key field changes. this.listItem returns the row's current item, including in a server-rendered row, where it was null. A later write of false to a non-boolean attribute gives "false", and an item-level computed on a server-rendered row updates with component state.
When a guard blocks a navigation the browser started (Back, Forward, or a plain link in hash mode), the address stays on the current route. In hash mode, navigate() with replace: true adds no history entry. In the typings, a form rule's check function can read this without breaking the component's types.
Development builds now warn about four markup mistakes that rendered wrong with no message (WF-509), report a template that uses itself (WF-412), and warn when data-bind is on a checkbox or a radio button.
Five changes to check for: onPropsChange runs once after a block of writes, with the final values. A prop at its default takes the parent's value once the parent has one. When the browser arrives at an address that redirects, the target replaces that history entry. An import of the package is typed, and its default export is the wildflower instance, with the class as the named export WildflowerJS. The typings no longer declare the framework's internal registries, which a production build renames, so use wildflower.getComponents(), wildflower.getComponentInstance(), and wildflower.getStore().
Full details in the changelog (https://www.wildflowerjs.com/changelog.html#v1-5-9).