Skip to content

Commit

Permalink
feat(platform): table filter
Browse files Browse the repository at this point in the history
closes [#11783](#11783)

- Fixed formatting

## Before

<img width="666" alt="Screenshot 2024-11-25 at 17 49 05" src="https://github.com/user-attachments/assets/dd9fe3fd-2e4f-4c03-b4fd-462d0a9b8429">

## After

<img width="854" alt="Screenshot 2024-11-25 at 17 49 53" src="https://github.com/user-attachments/assets/c76fcdd5-44f6-4b59-b3ac-7576f43f1989">
  • Loading branch information
khotcholava committed Dec 20, 2024
1 parent 949cdad commit fc4012d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libs/platform/table-helpers/services/table.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { skip } from 'rxjs/operators';
import { DEFAULT_TABLE_STATE } from '../constants';

import { toSignal } from '@angular/core/rxjs-interop';
import { Nullable } from '@fundamental-ngx/cdk/utils';
import { CollectionFilter, CollectionGroup, CollectionPage, CollectionSort, TableState } from '../interfaces';
import {
ColumnsChange,
Expand All @@ -17,7 +18,6 @@ import {
SortChange
} from '../models';
import { TableColumn } from '../table-column';
import { Nullable } from '@fundamental-ngx/cdk';

export type TableStateChange =
| TableStateProperty<'sort', SortChange>
Expand Down Expand Up @@ -191,9 +191,9 @@ export class TableService {

const newFilterRules: CollectionFilter[] = filterRules
? filterRules.map((rule) => ({
...rule,
fieldName: this._getFieldName(rule.field, rule.fieldName)
}))
...rule,
fieldName: this._getFieldName(rule.field, rule.fieldName)
}))
: [];
const state: TableState = { ...prevState, filterBy: newFilterRules };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export class FilterStepComponent implements FiltersViewStep {
@Input()
columnName: string;


/** Go back event */
@Output()
back: EventEmitter<void> = new EventEmitter<void>();
Expand Down
1 change: 0 additions & 1 deletion libs/platform/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,6 @@ export class TableComponent<T = any>
return value.map((val) => this._formatParams(val)).join(', ');
}


return Object.entries(value)
.map(([key, val]) => `${key}: ${this._formatParams(val)}`) // Recursive call for nested objects
.join(', ');
Expand Down

0 comments on commit fc4012d

Please sign in to comment.