#mut in 2025. I'm trying to use mut for my selects instead of a bunch of different onChange functions

1 messages · Page 1 of 1 (latest)

raven gate
#

I'm trying to use mut in 2025 to change the select value, but I can't find any examples. that aren't like this.
old way?
{{action (mut @assessment.assessmentCategory) value="target.value" }}
new way??
{{on "change" (mut @assessment.assessmentCategory) value="target.value" }}

raven gate
#

<MyChild @childClickCount={{this.totalClicks}} @click-count-change={{fn (mut totalClicks))}} />
or

{{my-child childClickCount=totalClicks click-count-change=(fn (mut totalClicks))}}
The child Component would invoke the function with the new click value:

export default class MyChild extends Component {
  click() {
    this.get('click-count-change')(this.get('childClickCount') + 1);
  }
}
#

I'm trying to follow this example, but how is click() called .. I dont see where its called because they don't have the component in the example

#

chatGPT said it's deprecated lmao

#

Guess thats why I was just seeing old examples.. :/ guess I'll make a service for a select

proven vessel
#

how is click called

I don't see that it is

#

chatGPT said its deprecated

yea, I wouldn't use mut, it's really confusing to teach and explain how it works

raven gate
#

Making a select service that can handle all select related functionality. Thanks

raven gate
#

@proven vessel is value="target.value" still a thing?

proven vessel
#

nope

cold frost
#

That only ever worked with the {{action}} helper, which is super duper deprecated (possibly doesn't exist anymore?)

proven vessel
#

Correct, they were removed in v6

raven gate
#

yeah I wondered why my old old project had it but the new one didn't..