keystonejs/keystone-classic

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

Open

#3,598 建立於 2016年10月13日

在 GitHub 查看
 (3 留言) (1 反應) (0 負責人)JavaScript (14,656 star) (2,288 fork)batch import
bughelp wanted

描述

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

貢獻者指南