Skip to content

Commit

Permalink
More :bindable metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Aug 28, 2023
1 parent b45c5e2 commit 70a6beb
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/feathers/controls/ButtonBar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package feathers.controls;

import feathers.events.FeathersEvent;
import feathers.controls.dataRenderers.IDataRenderer;
import feathers.core.FeathersControl;
import feathers.core.IUIControl;
Expand Down Expand Up @@ -148,6 +149,7 @@ class ButtonBar extends FeathersControl {
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand All @@ -170,6 +172,7 @@ class ButtonBar extends FeathersControl {
this._dataProvider.addEventListener(FlatCollectionEvent.UPDATE_ALL, buttonBar_dataProvider_updateAllHandler);
}
this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/ComboBox.hx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class ComboBox extends FeathersControl implements IIndexSelector implements IDat
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand Down Expand Up @@ -255,6 +256,7 @@ class ComboBox extends FeathersControl implements IIndexSelector implements IDat
this._dataProvider.filterFunction = this.comboBoxFilterFunction;
}
this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/GridView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class GridView extends BaseScrollContainer implements IIndexSelector implements
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand Down Expand Up @@ -428,6 +429,7 @@ class GridView extends BaseScrollContainer implements IIndexSelector implements
}

this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/GroupListView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class GroupListView extends BaseScrollContainer implements IDataSelector<Dynamic
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IHierarchicalCollection<Dynamic>;

private function get_dataProvider():IHierarchicalCollection<Dynamic> {
Expand Down Expand Up @@ -367,6 +368,7 @@ class GroupListView extends BaseScrollContainer implements IDataSelector<Dynamic
this.selectedLocation = null;

this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/ListView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class ListView extends BaseScrollContainer implements IIndexSelector implements
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand Down Expand Up @@ -335,6 +336,7 @@ class ListView extends BaseScrollContainer implements IIndexSelector implements
this.selectedIndex = -1; // use the setter

this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/PopUpListView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ class PopUpListView extends FeathersControl implements IIndexSelector implements
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand Down Expand Up @@ -232,6 +233,7 @@ class PopUpListView extends FeathersControl implements IIndexSelector implements
FeathersEvent.dispatch(this, Event.CHANGE);
}
this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/TabBar.hx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class TabBar extends FeathersControl implements IIndexSelector implements IDataS
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<Dynamic>;

private function get_dataProvider():IFlatCollection<Dynamic> {
Expand Down Expand Up @@ -216,6 +217,7 @@ class TabBar extends FeathersControl implements IIndexSelector implements IDataS
FeathersEvent.dispatch(this, Event.CHANGE);
}
this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/TreeGridView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ class TreeGridView extends BaseScrollContainer implements IDataSelector<Dynamic>
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IHierarchicalCollection<Dynamic>;

private function get_dataProvider():IHierarchicalCollection<Dynamic> {
Expand Down Expand Up @@ -432,6 +433,7 @@ class TreeGridView extends BaseScrollContainer implements IDataSelector<Dynamic>
}

this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/TreeView.hx
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ class TreeView extends BaseScrollContainer implements IDataSelector<Dynamic> imp
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IHierarchicalCollection<Dynamic>;

private function get_dataProvider():IHierarchicalCollection<Dynamic> {
Expand Down Expand Up @@ -396,6 +397,7 @@ class TreeView extends BaseScrollContainer implements IDataSelector<Dynamic> imp
this.selectedLocation = null;

this.setInvalid(DATA);
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/navigators/PageNavigator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class PageNavigator extends BaseNavigator implements IIndexSelector implements I
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<PageItem>;

private function get_dataProvider():IFlatCollection<PageItem> {
Expand Down Expand Up @@ -144,6 +145,7 @@ class PageNavigator extends BaseNavigator implements IIndexSelector implements I
// use the setter
this.selectedIndex = 0;
}
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down
2 changes: 2 additions & 0 deletions src/feathers/controls/navigators/TabNavigator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class TabNavigator extends BaseNavigator implements IIndexSelector implements ID
@since 1.0.0
**/
@:bindable("dataChange")
public var dataProvider(get, set):IFlatCollection<TabItem>;

private function get_dataProvider():IFlatCollection<TabItem> {
Expand Down Expand Up @@ -146,6 +147,7 @@ class TabNavigator extends BaseNavigator implements IIndexSelector implements ID
// use the setter
this.selectedIndex = 0;
}
FeathersEvent.dispatch(this, "dataChange");
return this._dataProvider;
}

Expand Down

0 comments on commit 70a6beb

Please sign in to comment.