Skip to content

Commit 3c4506e

Browse files
committed
Fix playground example
1 parent 1efb25a commit 3c4506e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/playground.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@
145145
class GreeterComponent extends Controller {
146146
randomize() {
147147
const names = [ "Tom", "Dick", "Harry" ];
148-
this.data.name = names[Math.floor(Math.random() * names.length)];
148+
this.binds.name.value = names[Math.floor(Math.random() * names.length)];
149149
this.render();
150150
}
151151
}
152152
153153
registerControllers(GreeterComponent);`;
154154
155155
const defaultHtml = `<greeter-component :default-name="World">
156-
<input type="text" @bind="name" />
156+
<input type="text" @bind="name" @input="render" />
157157
<p @render.eval>Hello, {this.binds.name.value || this.args.defaultName}</p>
158158
<button @click="this.randomize">Random Name</button>
159159
</greeter-component>`;

0 commit comments

Comments
 (0)