-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Datatable: Remove Expanded 'td' element returned with 'tr' #3310
Comments
I don't understand what you are asking? you define |
@melloware sure here you go https://codesandbox.io/s/elastic-rain-s0wcg7 What I want is when the row is expanded to be able to have same table alignment. When you expand a row in the example I want the To cut it short, I need the |
I see what you mean. It fills the table width with a colspan and then you fill in the guts. <tr id={id} className="p-datatable-row-expansion" role="row">
<td role="cell" colSpan={colSpan}>
{content}
</td>
</tr> |
PR submitted so you will be able to tell the table you want control of the rendering. This will allow you to take control of the rendering like this.. const rowExpansionTemplate = (data, options) => {
options.customRendering = true;
return (
<>
<td colSpan={2}>name xx</td>
<td style={{ background: "lightblue" }}>price template expanded</td>
</>
);
}; |
@melloware great! |
Describe the feature you would like to see added
Is there any particular reason on why
rowExpansionTemplate
returns<tr><td /></tr>
?Is your feature request related to a problem?
I need to have same alignment of the expanded view as in the rows
The text was updated successfully, but these errors were encountered: