keystonejs/keystone-classic

[4.0] Bad Select Options for relationships depending on other relationships

Offen

#3.598 geöffnet am 13.10.2016

 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (2.288 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (14.656 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Steps to reproduce the behavior

Have a Model with the following fields, the idea being that 'two''s choices depend on what you selected in 'one'

one: { type: Types.Relationship, ref:"SomeModel", required:true, initial:true } two: { type: Types.Relationship, ref:"SomeOtherModel", required:true, initial:true, filters: { from: ':one' }},

Now in the admin ui if you choose a value for 'one', then go to the dropdown for 'two', the options in the dropdown lag behind what they should be, and to get the correct options you have to select a value, then unselect it, then try the dropdown again.

Expected behavior

you get values in the dropdown for 'two' of SomeOtherModel rows that have the 'from' field matching 'one'

Actual behavior

you get values in the dropdown for 'two' of SomeOtherModel rows that have the 'from' field matching what 'one' was previously

Contributor Guide