0
我有categories
其中有许多products
和一个窗体显示下拉菜单。一旦Category
被选中,Product
下拉列表中的值将被过滤,以便只显示属于category
的products
。这工作正常,直到用户将selectedProduct
下拉列表设置为特定值。从控制器设置表格的值
我怎么能重置selectedProduct
下拉到All Products
如果用户点击一个不同的Category
他在Product
点击后?
应用/模板/ index.hbs
{{view "select" prompt="All Categories"
content=filteredCategories
optionLabelPath="content.name"
optionValuePath="content.name"
value=selectedCategory}}
{{view "select" prompt="All Products"
content=filteredProducts
optionLabelPath="content.name"
optionValuePath="content.name"
value=selectedProduct}}