I would like to know if there is the possibility to update the column definition on data filtering.
Here is a code pen that fully show my situation.
let tableData = [
{
name: "Donna Summer",
gender: "female"
},
{
name: "Oli Bob",
gender: "male",
filed_male: "1"
},
{
name: "Mary May",
gender: "female",
filed_female: "2"
},
{
name: "Christine Lobowski",
gender: "female",
filed_female: "2"
},
{
name: "Brendon Philips",
gender: "male",
filed_male: "1"
}
I have table data with different fields, in that case rows with gender: “female” have a non common field “filed_female” and rows with gender: “male” have a non common field “filed_male”.
I would like to update columns definition on filtering rows with gender female/male to show also the column filed_female/filed_male.
I’ve already try a solution, updating table data with only filtered rows, but than I can’t remove the filter to show again all the rows.
Is there any other solution? Many thanks!