discourse/plugins/styleguide/assets/javascripts/discourse
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
..
components DEV: Introduce a helper for handling events (#25433) 2024-02-28 14:00:53 +01:00
controllers DEV: Remove `renderTemplate` from the styleguide (#21660) 2023-05-25 11:22:36 +02:00
helpers DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
lib UX: Add category & section for syntax & BEM (#24516) 2023-11-22 17:44:04 -06:00
pre-initializers DEV: Remove `renderTemplate` from the styleguide (#21660) 2023-05-25 11:22:36 +02:00
routes DEV: Sort imports 2023-10-10 21:46:54 +01:00
templates UX: Add category & section for syntax & BEM (#24516) 2023-11-22 17:44:04 -06:00
styleguide-route-map.js DEV: Remove `.es6` extensions from core (#14912) 2021-11-13 12:51:53 +01:00