Skip to content

Commit

Permalink
Fix schema switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 17, 2023
1 parent 5c293a2 commit 533daf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class ContentsPageComponent extends ResourceOwner implements OnInit {
this.own(
combineLatest([schema$, tableName$])
.subscribe(([schema, fieldNames]) => {
if (!this.schema) {
if (this.schema?.id !== schema.id) {
this.resetSelection();

this.schema = schema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
<div class="form-check">
<input class="form-check-input" type="checkbox" checked (click)="removeField(field)" id="field_{{field}}" [disabled]="!field">
<label class="form-check-label" for="field_{{field}}">
{{(field.title || field.label) | sqxTranslate}}: <code>{{field.name}}</code>
<span *ngIf="field.name">
{{(field.title || field.label) | sqxTranslate}}: <code>{{field.name}}</code>
</span>
<span class="text-muted" *ngIf="!field.name">
- Placeholder -
</span>
</label>
</div>
</div>
Expand All @@ -33,7 +38,12 @@
<div class="form-check">
<input class="form-check-input" type="checkbox" (click)="addField(field)" id="field_{{field}}">
<label class="form-check-label" for="field_{{field}}">
{{(field.title || field.label) | sqxTranslate}}: <code>{{field.name}}</code>
<span *ngIf="field.name">
{{(field.title || field.label) | sqxTranslate}}: <code>{{field.name}}</code>
</span>
<span class="text-muted" *ngIf="!field.name">
- Placeholder -
</span>
</label>
</div>
</div>
Expand Down

0 comments on commit 533daf1

Please sign in to comment.