Skip to content

Commit

Permalink
Merge pull request #1 from IgniteUI/zdrawku-2024-10-16
Browse files Browse the repository at this point in the history
NG Conf Demo updates
  • Loading branch information
zdrawku authored Oct 16, 2024
2 parents 6759c8b + e71e05d commit 792d63c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
14 changes: 12 additions & 2 deletions src/app/admin-panel/admin-panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
<igx-column field="id" dataType="number" header="id" [hidden]="true" [filterable]="true" [groupable]="true" [sortable]="true" [selectable]="false"></igx-column>
<igx-column field="name" dataType="string" header="name" [filterable]="true" [groupable]="true" [sortable]="true" [selectable]="false"></igx-column>
<igx-column field="categoryID" dataType="number" header="categoryID" [filterable]="true" [groupable]="true" [sortable]="true" [selectable]="false">
<ng-template igxCell let-cell="cell">
<igx-select type="border" [(ngModel)]="cell.value" class="select">
@for (item of ngConfToyStoreAPICategoryModel; track item) {
<igx-select-item [value]="item.id">
{{ item.name }}
</igx-select-item>
}
<label igxLabel>CategoryID</label>
</igx-select>
</ng-template>
<ng-template igxCellEditor let-cell="cell">
@if (selectVisible) {
<igx-select type="border" [(ngModel)]="cell.editValue" class="select">
<igx-select type="border" [(ngModel)]="cell.editValue" class="select_1">
@for (item of ngConfToyStoreAPICategoryModel; track item) {
<igx-select-item [value]="item.id">
{{ item.name }}
Expand All @@ -32,7 +42,7 @@
</igx-radio-group>
</ng-template>
</igx-column>
<igx-column field="price" dataType="currency" header="price" [filterable]="true" [groupable]="true" [sortable]="true" [selectable]="false"></igx-column>
<igx-column field="price" dataType="currency" header="price" width="283px" [filterable]="true" [groupable]="true" [sortable]="true" [selectable]="false"></igx-column>
<igx-action-strip>
<igx-grid-pinning-actions></igx-grid-pinning-actions>
<igx-grid-editing-actions [addRow]="true"></igx-grid-editing-actions>
Expand Down
4 changes: 4 additions & 0 deletions src/app/admin-panel/admin-panel.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
flex-basis: 0;
}
.select {
height: max-content;
min-width: min-content;
}
.select_1 {
--ig-size: var(--ig-size-small);
height: max-content;
min-width: min-content;
Expand Down
4 changes: 2 additions & 2 deletions src/app/admin-panel/admin-panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { IGridEditDoneEventArgs, IGX_GRID_ACTION_STRIP_DIRECTIVES, IGX_GRID_DIRECTIVES, IGX_INPUT_GROUP_DIRECTIVES, IGX_SELECT_DIRECTIVES, IgxRadioComponent, IgxRadioGroupDirective, IRowDataEventArgs } from 'igniteui-angular';
import { Subject, takeUntil } from 'rxjs';
import { CategoryModel } from '../models/ng-conf-toy-store-api/category-model';
import { ToyModel } from '../models/my-api/toy-model';
import { CategoryModel } from '../models/ng-conf-toy-store-api/category-model';
import { NgConfToyStoreAPIService } from '../services/ng-conf-toy-store-api.service';
import { MyAPIService } from '../services/my-api.service';

Expand All @@ -17,8 +17,8 @@ import { MyAPIService } from '../services/my-api.service';
export class AdminPanelComponent implements OnInit, OnDestroy {
private destroy$: Subject<void> = new Subject<void>();
public myAPIToyModel: ToyModel[] = [];
public selectVisible: boolean = false;
public ngConfToyStoreAPICategoryModel: CategoryModel[] = [];
public selectVisible: boolean = false;

constructor(
private myAPIService: MyAPIService,
Expand Down
10 changes: 5 additions & 5 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
display: flex;
}
.header {
background-color: hsla(var(--ig-secondary-500));
background-color: hsla(var(--ig-secondary-400));
border-color: hsla(var(--ig-gray-200));
border-width: 0px 0px 1px;
border-style: solid;
Expand Down Expand Up @@ -67,7 +67,7 @@
flex-basis: 0;
}
.footer {
background-color: hsla(var(--ig-secondary-500));
background-color: hsla(var(--ig-secondary-400));
border-color: hsla(var(--ig-gray-200));
border-width: 2px 0px 0px;
border-style: solid;
Expand Down Expand Up @@ -106,9 +106,9 @@
.view-container {
overflow: auto;
position: relative;
width: 80%;
min-width: 80%;
max-width: 85%;
width: 85%;
min-width: 85%;
max-width: 90%;
flex-grow: 1;
flex-basis: 0;
}
4 changes: 2 additions & 2 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
@include typography($font-family: "Boogaloo");

$custom-palette: palette(
$primary: #89ccf8,
$secondary: #fca1ca,
$primary: #a7dcff,
$secondary: #fdb8d7,
$surface: #fff);
@include theme($palette: $custom-palette, $roundness: 0.5);

Expand Down

0 comments on commit 792d63c

Please sign in to comment.