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

Allow tables to access second level or more of data #75

Open
alberto-ag-devo opened this issue Sep 12, 2024 · 3 comments
Open

Allow tables to access second level or more of data #75

alberto-ag-devo opened this issue Sep 12, 2024 · 3 comments
Labels
enhancement New feature or request genesys-ui-table good first issue Good for newcomers

Comments

@alberto-ag-devo
Copy link

What is the problem this feature will solve?

Make this type of model data printable in the table rows

interface a {
  adata: string;
  bdata: b;
}

interface b {
  bChildData: string;
}

What is the feature you are proposing to solve the problem?

What alternatives have you considered?

No response

@alberto-ag-devo alberto-ag-devo added the enhancement New feature or request label Sep 12, 2024
@trigoporres trigoporres added the good first issue Good for newcomers label Nov 15, 2024
@trigoporres
Copy link
Contributor

trigoporres commented Nov 15, 2024

Good morning @alberto-ag-devo :

the doubt is how to represent in the cell the value name when the data are of this form?:

username: {
   name:  'Santiago',
   country: 'España',
   city: 'Madrid'
}

@alberto-ag-devo
Copy link
Author

Good morning @alberto-ag-devo :

the doubt is how to represent in the cell the value name when the data are of this form?:

username: {
   name:  'Santiago',
   country: 'España',
   city: 'Madrid'
}

Exactly! thats the doubt

@trigoporres
Copy link
Contributor

You can do this with the valueFormatter, is useful to apply any type of format to the value but also for this case in which an object arrives and we want to represent one or several values.

valueFormatter: (value) => value.name;
valueFormatter: (value) => `${value.name} lives in ${value.city}`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request genesys-ui-table good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants