Jarek Radosz
36a9b5d0fa
DEV: Introduce a helper for handling events (#25433)
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)))}}
```
2024-02-28 14:00:53 +01:00
..
2023-10-25 09:14:27 +10:00
2023-11-28 10:49:49 +01:00
2024-02-09 10:14:00 -06:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-11-08 10:53:06 +01:00
2023-10-10 21:46:54 +01:00
2023-11-08 10:53:06 +01:00
2023-10-10 21:46:54 +01:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-12-13 16:22:48 -07:00
2024-01-24 15:30:03 +01:00
2023-11-08 10:53:06 +01:00
2023-10-10 21:46:54 +01:00
2023-11-08 10:53:06 +01:00
2023-02-23 15:32:53 +00:00
2024-02-28 14:00:53 +01:00
2023-10-06 19:21:01 +02:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-11-08 10:53:06 +01:00
2023-02-23 15:32:53 +00:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-11-08 10:53:06 +01:00
2023-02-23 15:32:53 +00:00
2023-07-05 10:27:29 +01:00
2023-07-05 10:27:29 +01:00
2023-11-08 10:53:06 +01:00
2023-06-09 11:02:55 -04:00
2023-11-08 10:53:06 +01:00
2023-02-23 15:32:53 +00:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-08-31 11:49:35 +02:00
2023-08-25 09:20:14 -05:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00
2023-02-13 11:42:38 +00:00
2023-02-23 15:32:53 +00:00