mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 01:52:18 +08:00
Instead of
```hbs
{{on "input" (action this.foo value="target.value")}}
{{on "input" (action (mut this.bar) value="target.value")}}
```
you can use:
```hbs
{{on "input" (with-event-value this.foo)}}
{{on "input" (with-event-value (fn (mut this.bar)))}}
```
or in gjs:
```gjs
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import withEventValue from "discourse/helpers/with-event-value";
…
{{on "input" (withEventValue (fn (mut this.bar)))}}
```
|
||
|---|---|---|
| .. | ||
| app/controllers/styleguide | ||
| assets | ||
| config | ||
| db/post_migrate | ||
| lib/styleguide | ||
| public/images | ||
| spec/integration | ||
| plugin.rb | ||
| README.md | ||
| screenshot.png | ||
