Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@aria:Select widget behaves incorrect when bound options change #1055

Closed
carlo-mr opened this issue Mar 25, 2014 · 3 comments
Closed

@aria:Select widget behaves incorrect when bound options change #1055

carlo-mr opened this issue Mar 25, 2014 · 3 comments
Labels
Milestone

Comments

@carlo-mr
Copy link
Contributor

When binding the options of an @aria:Select, the display is reset to the first value but the value in the data model does not change.

See the Example in Instant AT.

Workflow to reproduce:

  1. Select 'B' in the right select box
  2. Switch to "Type B" in the first select box
  3. Click the Button.

The data model has the values "B" and "B" but the display shows "B" and "A".

Even worse:

  1. Select "Type B" in the first select box.
  2. Select "C" in the right select box.
  3. Switch back to "Type A".
  4. Click the Button.

The data model contains the values "A" and "C", where "C" is not even a correct value for "Type A".

The problem seems to be in the _onboundPropertyChange-Method in the Select widget. Which - after setting the new options - calls controller.checkValue with null instead of the current value.

If the display of the widget is reset after changing the options then the bound property should also be resetted. Or if the bound value is contained in the new options-list it should be directly selected.

This might apply to all "DropDownInputs".

@dpreussner
Copy link
Contributor

In aria.widgets.form.Select replace lines 420 - 423 with the following and this seems to fix the issue...

var report = this.controller.checkValue(this._cfg.value);
this._reactToControllerReport(report, {
       stopValueProp : false
});

smadapathi pushed a commit to smadapathi/ariatemplates that referenced this issue Jun 17, 2014
smadapathi pushed a commit to smadapathi/ariatemplates that referenced this issue Jul 15, 2014
@jakub-g
Copy link
Collaborator

jakub-g commented Sep 30, 2014

The first scenario was fixed in 1.6.5 via #1274
The second scenario is still reproducible as of 1.6.5

jakub-g pushed a commit to jakub-g/ariatemplates that referenced this issue Sep 30, 2014
…e with options

When `@aria:Select` options were bound to the data model,
and the currently selected option was removed from the option list
through the binding, it still remained as the data model value
of the widget (although no longer available in the UI).

Close ariatemplates#1218
Close ariatemplates#1309
jakub-g pushed a commit to jakub-g/ariatemplates that referenced this issue Sep 30, 2014
… from options list

When `@aria:Select` options were bound to the data model,
and the currently selected option was removed from the option list
through the binding, it still remained as the data model value
of the widget (although no longer available in the UI).

Close ariatemplates#1218
Close ariatemplates#1309
@jakub-g jakub-g added this to the v1.6.6 milestone Oct 1, 2014
@jakub-g
Copy link
Collaborator

jakub-g commented Oct 1, 2014

This will be fixed in 1.6.6, @carlo-mr @dpreussner thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants