Skip to content

Commit

Permalink
feat: ✨ add GxColumn.FloatingFilter
Browse files Browse the repository at this point in the history
Enabling/disabling the floatingFilter on the Options level is deprecated. Use `GxColumn.FloatingFilter` on the column level instead.
  • Loading branch information
hyyan committed Jun 2, 2020
1 parent f602031 commit 5fb4619
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions GxColumns.bbj
Expand Up @@ -223,6 +223,13 @@ class public GxDefaultColumnDefinition extends GxColumnDefinition
rem */
field public BBjNumber EnableFilter! = 1
rem /**
rem * When true enable the floating filter on this column , false otherwise
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRenderer</small></b>
rem */
field public BBjNumber FloatingFilter! = null()
rem /**
rem * Set to true to make a column hidden by default&#183;
rem *
rem * <br><b><small>#Configuration</small></b>
Expand Down Expand Up @@ -1074,6 +1081,7 @@ class public GxDefaultColumnDefinition extends GxColumnDefinition
column!.addProperty("tooltipField",#getTooltipField(),err=*next)
column!.addProperty("tooltipValueGetter",#getTooltipValueGetterExpression().toString(),err=*next)
column!.addProperty("editable",#getEditable().booleanValue(),err=*next)
column!.addProperty("floatingFilter",#getFloatingFilter().booleanValue(),err=*next)
editableExpression! = #getEditableExpression()

if(editableExpression! <> null()) then
Expand Down
3 changes: 3 additions & 0 deletions GxOptions.bbj
Expand Up @@ -785,8 +785,11 @@ class public GxOptions
field public BBjNumber SuppressTouch! = null()
rem /**
rem * When true enables the floating filters, disable otherwise
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#GridRenderer</small></b>
rem *
rem * @deprecated enabling/disabling the floatingFilter on the Options level is deprecated. Use `GxColumn.FloatingFilter` on the column level instead.
rem */
field public BBjNumber EnableFloatingFilter! = 0
rem /**
Expand Down
2 changes: 1 addition & 1 deletion demo/Datatypes.bbj
Expand Up @@ -25,7 +25,7 @@ wnd! .setCallback(BBjAPI.ON_RESIZE,"resize")
REM init the grid
grid! = new BBjGridExWidget(wnd!,100,0,0,800,600)
grid!.getOptions().setEnableFilter(1)
grid!.getOptions().setEnableFloatingFilter(1)
grid!.getOptions().getDefaultColumnDefinition().setFloatingFilter(1)


rem /**
Expand Down
2 changes: 1 addition & 1 deletion demo/Editing.bbj
Expand Up @@ -38,7 +38,7 @@ wnd!.setCallback(BBjAPI.ON_RESIZE,"resize")

grid! = new BBjGridExWidget(wnd!,100,10,50,1430,550)
grid!.getOptions().setEnableFilter(1)
grid!.getOptions().setEnableFloatingFilter(1)
grid!.getOptions().getDefaultColumnDefinition().setFloatingFilter(1)

rem enable grid editing based on EDITABLE flag in DataRow Attribute
grid!.getOptions().setEditable(1)
Expand Down

0 comments on commit 5fb4619

Please sign in to comment.