There is a search being done on the backend and returning the data correctly, by react and java.
How to update the grid component?
const pivotGusa = useRef<Pivot | null>(null);
gusaPrincipal = (item: PesquisaGusa) => {
setLoading(true);
Promise.all([
gusaPesquisa(item).then(resp=> {resp&&setSumarioList(resp);}),
]).then(() => {
setLoading(false);
});
}
constreportGusaPrincipal= {
dataSource: {
data:sumarioList,
},
slice: {
rows: [
{uniqueName: "data" },
{uniqueName: "corrida" },
{uniqueName: "aco_Ling" },
{uniqueName: "origem" },
{uniqueName: "aco" },
{uniqueName: "s" },
{uniqueName: "c" },
{uniqueName: "mn" },
{uniqueName: "p" },
{uniqueName: "si" },
{uniqueName: "ti" },
{uniqueName: "cr" },
{uniqueName: "ni" },
{uniqueName: "cu" },
{uniqueName: "turma" },
{uniqueName: "turno" }
]
},
options: {
grid: {
type:'flat',
showFilter:true,
showHeaders:false,
showGrandTotals:'off',
},
},
};
<Pivot
ref={pivotGusa}
toolbar
report={reportGusaPrincipal}
height="450"
/>
What can it be ?
Hello,
Thank you for your question.
You can use the updateData() API call to update the component.
Please let us know if everything works fine for you.
Best Regards,
Vera