Skip to content

Conversation

@anaivanovska
Copy link
Collaborator

No description provided.

Ana Ivanovska added 3 commits August 3, 2022 12:22
If we have a nested objects, then the field
should be defined as path (array of string).
This way we will make sure that the raw value
will be properly calculated.
Also, with this improvement we can remove some value getters from the configuration where path was used
in order to get the value.
export const getRawValueResolver = ({field}: DataGridColumnWithId): ColumnValueGetter => R.prop(field);
export const getRawValueResolver = ({field}: DataGridColumnWithId): ColumnValueGetter => isString(field)
? R.prop(field)
: R.path(field);
Copy link
Contributor

@hdimitrieski hdimitrieski Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the field or its parent is null or undefined? Can you add a test case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case the raw value resolver will return 'undefined'.

Ana Ivanovska added 3 commits August 4, 2022 10:58
On the components ngrx-grid-header-item and
ngrx-dynamic-grid-header-item we do not
apply the defined width.
This width is applied on upper level, on parent
components. In order to make sure that
the right column width will be used, and that the test
will not depended on the screen where it is executed
we will use elementWidth instead of column.width.
@anaivanovska anaivanovska merged commit deca289 into master Aug 4, 2022
@velinovskav velinovskav deleted the feat/add-support-for-field-config-as-array branch November 22, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants