Framework: Upgrade to 1.0.0-rc.1.0.1

Created on 8 Jul 2016  路  5Comments  路  Source: aurelia/framework

Hey guys,

Today, my jspm updated the framework libraries to the version 1.0.0-rc.1.0.1, but after that, a component that uses a change.delegate on a input element stopped working. I changed it to change.trigger and nothing. The callback is not called anymore. I don't think that is a problem with code mine because it was just working yesterday...

question

All 5 comments

@jdanyow Know anything about this?

The template code:

<input name="${name}" type="hidden" change.delegate="onChange($event)">

The viewmodel code:

  onChange(e: Event) {
    const selectedText = (<HTMLInputElement>e.target).value;

    console.log("DROPDOWN CHANGED", e);

    if (!selectedText) {
      this.clearSelection();
    } else {
      this.selectItemByDisplayMember(selectedText);
    }

    if (this.onItemSelected) {
      this.onItemSelected(this.selectedItem);
    }
  }

The code above doesn't exactly make sense to me. How does the input[hidden] change exactly? We would need a full reproduction on this.

Sorry, @EisenbergEffect for the late answer!

This was a wrapper over the dropdown of the semantic-ui library. That library changes the input value and I was trying a way to get the current value directly from the dom node unstead of using the JS api of the dropdown, but I don麓t have the code anymore. We had to change from Aurelia to React because of problems with the binding order calls of the *changed methods from Aurelia, in a component. While I love Aurelia, I tried a lot of things: I used task queues, I mixed aurelia with some other observables tools (like mobx, knockout etc) to get a more predictible behavior, but nothing. Nobody could help me too, on Slack, then my team has chosen to take away Aurelia. So, you can close this issue, but I'm open if you want to discuss that problem. :+1:

You should have mentioned the input's value was being set by semantic ui! When the value of an input is changed using myInput.value = 'something', no DOM events are fired. That's why change.delegate="onChange($event)" didn't do anything.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

firelizzard18 picture firelizzard18  路  3Comments

FunkMonkey33 picture FunkMonkey33  路  5Comments

txels picture txels  路  6Comments

jfbaquerocelis picture jfbaquerocelis  路  3Comments

gbreeze picture gbreeze  路  4Comments