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
..
2024-02-28 14:00:53 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-28 14:00:53 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-28 16:59:36 +11:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2020-09-22 16:28:28 +02:00
2020-04-28 10:14:49 -04:00
2022-08-17 22:39:52 +01:00
2024-01-03 10:39:59 +00:00
2024-02-27 10:48:30 +01:00
2023-10-12 14:44:01 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2024-02-27 10:48:30 +01:00
2021-08-04 22:04:58 +02:00
2021-01-22 10:41:01 -05:00
2023-01-16 17:28:59 +00:00
2023-09-14 12:25:06 +01:00
2024-02-08 11:55:32 +00:00