DiscreteValuesFilterVM.Common.symbol optional populates item with new 'display_symbols'

This commit is contained in:
John Colvin committed 2020-06-23 15:50:59 -05:00
1 parent 6135e477e0
commit ce725867fa
1 file changed
+4 -2
@@ -402,8 +402,10 @@ namespace mbts.spark.filters {
public static IDataGridColumnPersistentFilter<TRow, Venue[]> exchange<TRow>(Func<TRow, Venue> get_row_exchange, string prop_name) =>
Create(EnumHelper.get_values_except(Venue.Unset).ToList(), get_row_exchange, prop_name);
// Symbol
public static IDataGridColumnPersistentFilter<TRow, string[]> symbol<TRow>(Func<TRow, string> get_row_symbol, string prop_name) =>
Create(co2.UserSymbol.get_all().Select(u => u.symbol).Distinct().ToList(), get_row_symbol, prop_name);
public static IDataGridColumnPersistentFilter<TRow, string[]> symbol<TRow>(Func<TRow, string> get_row_symbol, string prop_name, bool use_display_symbols = true) {
var symbols = use_display_symbols ? SecurityHelper.get_all_display_symbols() : co2.UserSymbol.get_all().Select(u => u.symbol);
return Create(symbols.Distinct().ToList(), get_row_symbol, prop_name);
}
// Security Type
public static IDataGridColumnPersistentFilter<TRow, Security.ContractOneofCase[]> security_type<TRow>(Func<TRow, Security.ContractOneofCase> get_row_security_type, string prop_name) =>
Create(EnumHelper.get_values_except(