@@ -256,8 +256,8 @@ apply_sort_to_table x sort_col_index_list sort_direction_list =
256
256
- filter_action: list of filter actions
257
257
- filter_val: values to filter
258
258
259
- apply__single_filter_to_table : Table -> Text -> Filter_Condition -> Any -> Any -> Table
260
- apply__single_filter_to_table table filter_col filter_action filter_val filter_to_val =
259
+ apply_single_filter_to_table : Table -> Text -> Filter_Condition -> Any -> Any -> Table
260
+ apply_single_filter_to_table table filter_col filter_action filter_val filter_to_val =
261
261
result = case filter_action of
262
262
Filter_Condition.Between _ _ _ -> table.filter (filter_col+1) (Filter_Condition.Between filter_val filter_to_val)
263
263
Filter_Condition.Is_In _ _ -> if filter_val.length > 0 then table.filter (filter_col+1) (Filter_Condition.Is_In filter_val) else table.filter filter_col (Filter_Condition.Is_In [""])
@@ -281,7 +281,7 @@ apply_filter_to_table table i filter_col filter_action filter_val filter_to_val
281
281
action = filter_action.get i
282
282
val = filter_val.get i
283
283
to_val = filter_to_val.get i
284
- filtered_table = apply__single_filter_to_table table col action val to_val
284
+ filtered_table = apply_single_filter_to_table table col action val to_val
285
285
@Tail_Call apply_filter_to_table filtered_table i+1 filter_col filter_action filter_val filter_to_val
286
286
287
287
## PRIVATE
@@ -294,8 +294,9 @@ apply_filter_to_table table i filter_col filter_action filter_val filter_to_val
294
294
get_rows_for_table : Any -> Integer -> List -> List -> List -> List -> List -> List -> JS_Object
295
295
get_rows_for_table x start_number sort_col_index_list=Nothing sort_direction_list=Nothing filter_col=Nothing filter_action=Nothing filter_val=Nothing filter_extra_val=Nothing =
296
296
max_rows=100
297
- table_with_index = x.add_row_number '#'
298
- table_with_index_ordered = table_with_index.reorder_columns ['#'] ..Before_Other_Columns
297
+ col_name = x.make_temp_column_name
298
+ table_with_index = x.add_row_number col_name
299
+ table_with_index_ordered = table_with_index.reorder_columns [col_name] ..Before_Other_Columns
299
300
filtered_table = if filter_col.is_nothing then table_with_index_ordered else apply_filter_to_table table_with_index_ordered 0 filter_col filter_action filter_val filter_extra_val
300
301
sorted_table = if sort_col_index_list.is_nothing then filtered_table else apply_sort_to_table filtered_table sort_col_index_list sort_direction_list
301
302
all_rows_count = filtered_table.row_count
0 commit comments