@winz-socialsgmail-com
@winz-socialsgmail-com
Forum Replies Created
-
AuthorPosts
-
Winston SocialApps
Participantor is this wierd behaviour is because I used Grid as functional component?
…
const MyComponent:FC=() => {
const {datasource} = useGridHooks();
const {getColumns, onRowExpand} = useGridEvents();useEffect(()=>{
},[])
return (
<Grid
columns={getColumns}
datasource={datasource}
onRowExpand = {onRowExpand}
/>
)
}Is this supported approach?
Winston SocialApps
ParticipantSorry another problem I got, It can add a row using function addRow,
the problem after multiple rows, the whole expanded rows will collapsed.is there any property to set?
i tried———————-
currentHRGrid.beginUpdate();
// add-row
data.forEach((item:EntitlementsBalance, index:number, items:EntitlementsBalance[])=>{
const nextRequestType = index > 0 ? (item.requestType === data[index – 1].requestType ? ” : item.requestType) : item.requestType;
currentHRGrid.addRow({
id:item.id,
employeeName: item.employeeName,
employeeNameForDisplay: item.employeeNameForDisplay,
requestTypeCode: item.requestTypeCode,
requestType: nextRequestType,
year: item.year,
entitled: item.entitled,
pending: item.pending,
used: item.used,
balanced: item.balanced,
},true,(row:GridRow)=>{
console.debug(‘new-row-added:’, row);
});
});currentHRGrid.endUpdate(true);
———————–still same behaviour
also tried putting
grid.refreshView()no luck,
any possible suggestion?
Winston SocialApps
ParticipantThanks,
It works!Just a follow-up,
how to clear the rows previously added or clear the rows before expand? -
AuthorPosts