src/ui/data-source/smart-datasource.component.ts
The Angular Component wrapper over the SmartDataSource. Used for providing a declarative way of initializing a SmartDataSource.
AbstractSmartComponent
exportAs | smartDatasource |
selector | smart-datasource,smart-data-source |
constructor(serviceAdapter: SmartServiceAdapter, registry: DataSourceRegistry, smartErrorHandler: SmartErrorHandlerService, toolbarRegistry: SmartToolbarRegistry, filterRegistry: SmartFilterRegistry, viewManager: SmartViewManagerService, injector: Injector, route: ActivatedRoute, vcRef: ViewContainerRef)
|
||||||||||||||||||||||||||||||
Parameters :
|
after-save-changes |
Optional callback. If set, it will be called after a save changes operation. |
before-save-changes |
Optional callback. If set, it will be called before a save changes operation. |
smart-auto-fetch |
Type : boolean
|
When set to false, prevents the Smart Data Source to auto fetch data when the filter or runtimeFilters have changed, or when a selection changed event has been fired by a parent Smart Data Source |
smart-business-entity-name |
Type : string
|
The Smart Business Entity name, used for initializing the underlying JSDO |
smart-data-source |
Type : string
|
Specifies the parent data source. If set, the data source will subscribe to to the parent data source and filter according to it's selection. To be used alongside the "smart-foreign-fields" attribute |
smart-entity-table |
Type : string
|
The table that should be set as tableRef for the underlying JSDO |
smart-entity-view |
Type : string
|
The JSDO table views |
smart-filter |
Type : any
|
If set, the SmartDataSource will be initialized with this filter. |
smart-filter-source |
Type : string
|
Optional attribute that takes the smart-object-name of a Smart Filter as a value. If set, the data source will append filters generated by the Smart Filter when it's filter button is clicked. |
smart-foreign-fields |
Type : string
|
To be used alongside the "smart-data-source" attribute. It is used to specify the foreign key relation between the parent and the child data sources. |
smart-navigation-source |
Type : string
|
Optional attribute that takes the smart-object-name of a Smart Toolbar as a value. If set, the data source will adjust it's selection when the specified toolbar's navigation buttons are clicked. |
smart-object-name |
Type : string
|
The unique name by which the data source will be identified |
smart-partial-dataset |
Type : boolean
|
smart-server-side-filtering |
Type : boolean
|
Determines if the Smart Data Source will perform server side filtering. The default value is true. |
smart-server-side-sorting |
Type : boolean
|
smart-sort |
Type : SortDescriptor[]
|
If set, the SmartDataSource will be initialized with these sort options. |
use-initial-values |
Type : boolean
|
If set to true, when adding a new record, the Smart Data Source will set initial (default) values for the new record. |
on-ready |
Type : EventEmitter<SmartDataSource>
|
Fires when the SmartDataSource has been initialized. |
selection-changed |
Type : EventEmitter<SelectionChangedEventArgs>
|
Fires when a selection change has occurred. |
smart-object-name |
Type : EventEmitter<string>
|
Fires when the data source's object name has changed. |
state-changed |
Type : EventEmitter<DataSourceStateChangeEventArgs>
|
Fires when the state of the SmartDataSource has changed. |
Public fetch | ||||||||
fetch(query: IQuery)
|
||||||||
Parameters :
Returns :
void
|
dataSource |
Type : SmartDataSource
|
The initialized SmartDataSource object. |
objectName | ||||||
getobjectName()
|
||||||
Returns :
string
|
||||||
setobjectName(value: string)
|
||||||
The unique name by which the data source will be identified
Parameters :
Returns :
void
|
beforeSaveChanges | ||||
setbeforeSaveChanges(value)
|
||||
Optional callback. If set, it will be called before a save changes operation.
Parameters :
Returns :
void
|
afterSaveChanges | ||||
setafterSaveChanges(value)
|
||||
Optional callback. If set, it will be called after a save changes operation.
Parameters :
Returns :
void
|
parentDs | ||||||
getparentDs()
|
||||||
Returns :
string
|
||||||
setparentDs(value: string)
|
||||||
Specifies the parent data source. If set, the data source will subscribe to to the parent data source and filter according to it's selection. To be used alongside the "smart-foreign-fields" attribute
Parameters :
Returns :
void
|
serverSideSorting | ||||||
getserverSideSorting()
|
||||||
Returns :
boolean
|
||||||
setserverSideSorting(value: boolean)
|
||||||
Parameters :
Returns :
void
|