Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(EntityTable): breaking changes adjustment from the library #1045

Draft
wants to merge 3 commits into
base: release/16.0.0
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions src/app/pages/portal/portal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ import {
ActionStore,
ActionbarMode,
EntityRecord,
EntityService,
EntityStore,
EntityTableComponent,
EntityTablePaginatorOptions,
Tool, // getEntityTitle,
Tool,
Toolbox,
Widget,
Workspace,
Expand All @@ -43,7 +45,6 @@ import {
ConfigFileToGeoDBService,
DataSourceService,
EditionWorkspace,
EditionWorkspaceService,
FEATURE,
Feature,
FeatureMotion,
Expand Down Expand Up @@ -182,6 +183,9 @@ export class PortalComponent implements OnInit, OnDestroy {
@ViewChild('searchBar', { read: ElementRef, static: true })
searchBar: ElementRef;

@ViewChild(EntityTableComponent, { static: false })
entityTable: EntityTableComponent;

get map(): IgoMap {
return this.mapState.map;
}
Expand Down Expand Up @@ -328,7 +332,7 @@ export class PortalComponent implements OnInit, OnDestroy {
public dialogWindow: MatDialog,
private queryService: QueryService,
private storageService: StorageService,
private editionWorkspaceService: EditionWorkspaceService,
private entityService: EntityService,
private directionState: DirectionState,
private configFileToGeoDBService: ConfigFileToGeoDBService
) {
Expand Down Expand Up @@ -569,6 +573,11 @@ export class PortalComponent implements OnInit, OnDestroy {
}

addFeature(workspace: EditionWorkspace) {
if (!this.entityTable) {
return;
}
this.entityTable.enableEdition();

let feature = {
type: 'Feature',
properties: {}
Expand Down Expand Up @@ -1630,7 +1639,7 @@ export class PortalComponent implements OnInit, OnDestroy {
relationWorkspace?.meta.tableTemplate.columns.forEach((col) => {
// Update domain list
if (col.type === 'list' || col.type === 'autocomplete') {
this.editionWorkspaceService
this.entityService
.getDomainValues(col.relation)
.subscribe((result) => {
col.domainValues = result;
Expand Down