absent-sapphire
absent-sapphire4mo ago

useDataGrid placeholderData

Can I use placeholderData with useDataGrid
queryOptions: {
placeholderData: () => ({
data: {},
}),
},
queryOptions: {
placeholderData: () => ({
data: {},
}),
},
2 Replies
kapa.ai
kapa.ai4mo ago
Hi @Joe Gaffney. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you can use placeholderData with useDataGrid by passing it through the queryOptions property. Here is an example of how you can do it:
useDataGrid({
queryOptions: {
placeholderData: () => ({
data: {},
}),
},
});
useDataGrid({
queryOptions: {
placeholderData: () => ({
data: {},
}),
},
});
This configuration will provide placeholder data while the actual data is being fetched. For more details on queryOptions, you can refer to the useDataGrid documentation (https://refine.dev/docs/ui-integrations/material-ui/hooks/use-data-grid/#queryoptions). For additional information on how useDataGrid works and its properties, you can check the useDataGrid documentation (https://refine.dev/docs/ui-integrations/material-ui/hooks/use-data-grid/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4mo ago
<@422289470487003153> kapa.ai is still learning and improving, please let us know how it did by reacting below