Refine

R

Refine

Join the community to ask questions about Refine and get answers from other members.

Join

ask-any-question

discussions

generous-apricot
generous-apricot7/2/2024

How to set role from authprovider in accesControlProvider

right now i am following the tutorial from acces control tutorial, at that tutorial it set role manually in localstorage. but i want to get the role after i login and get it from authprovider. how to achieve that? when i try to use useGetIdentity directly like this it shows error ``` const { data: identity } = useGetIdentity<Iidentity>(); const roles = identity?.role ?? "guest"; // Default to "guest" if no role is found...
generous-apricot
generous-apricot7/2/2024

where to obtain the role? if i dont put manually role from localstorage i can't get it?

``` const role = sessionStorage.getItem("role"); return ( <BrowserRouter>...
generous-apricot
generous-apricot7/2/2024

Page shows blank page

when i am trying to use acces-control using casbin in antd integration, some of the page is showing blank page and not showing the data
generous-apricot
generous-apricot7/2/2024

How to filter data in List Table at the server

i want to filter data that being fetched in my list page but i want to filter it at the server side. so i need to sent role information from frontend to my server to filter the data
generous-apricot
generous-apricot7/2/2024

How to sent custom req body while fetching data

i want to sent some data to filter data fetching on the backend. How to sent custom data while fetching data to table in antd table ?
compatible-crimson
compatible-crimson7/2/2024

Next js app directory + live provider + supabase

Good afternoon, I am using live provider + supabase + next js with app directory, With the following code ```ts import { liveProvider } from '@refinedev/supabase'; import { supabaseBrowserClient } from '@utils/supabase/client';...
sunny-green
sunny-green7/1/2024

Proper way to use AuthProvider with Supabase

Hello, I’m new with Refine and I’m just playing with the AuthProvider and Supabase. I think I could make it working just like the tutorial https://refine.dev/blog/refine-pixels-6/#refineweek-series But I have a couple of question:...
fascinating-indigo
fascinating-indigo7/1/2024

Useing hook in mui

onFinish={async (values) => { try { const data = await onFinish({ name: values.name, salesOwnerId: values.salesOwnerId,...
flat-fuchsia
flat-fuchsia7/1/2024

Get the inferred type of Variables from data provider

I want to access the typescript type of variables parameter from one of my data provider method update. However, refine does not seem automatically infer the type defined in useForm hook
flat-fuchsia
flat-fuchsia7/1/2024

how to get the type of variables in data provider

How to get the type of variables in data provider, suppose I call useForm hook
generous-apricot
generous-apricot6/30/2024

Strange Error while using Casbin

i am trying to use Casbin to do accesControl. I try to run examples code from the web. But when i try to using Casbin in my project in shows strange error, It said that Buffer is not defined and that is from casbin library? Please help me solve this error.
No description
passive-yellow
passive-yellow6/30/2024

Blank login, registration, and password reset pages; Ant Design

Long story short, don't know what I changed exactly, but now, my auth pages don't "load". Typing the link in the dashboard doesn't redirect you there; just stays on the dashboard. Will upload my App.tsx under, I also get this warning in Chrome debug console;
No routes matched location "/login"
No routes matched location "/login"
...
reduced-jade
reduced-jade6/29/2024

table props

How to disable pagination in table props?
fair-rose
fair-rose6/28/2024

Passing Data Between Components

What is the best way to pass some information between components? In my parent component, within the actions column, I have an edit button that redirects to edit/:id when clicked. However, I need to pass some information to the rendered component. I thought about using the meta inside useGo, but that would be incorrect, right? Since these data are not meant to compose the URL but rather to be used within my component....
optimistic-gold
optimistic-gold6/28/2024

useList with Hasura (nested queries)

Not sure my data provider is correctly set up to handle the data response I desire, please see: https://github.com/refinedev/refine/discussions/6089 Thankful for all help....
optimistic-gold
optimistic-gold6/28/2024

Not getting useList with Hasura as GraphQL provider to work

This is my dataProvider: ``` import graphqlDataProvider, { GraphQLClient, liveProvider as graphqlLiveProvider,...
sensitive-blue
sensitive-blue6/28/2024

Can't change list pages

``` const { tableProps, filters } = useTable({ resource: 'venues', onSearch: (values: any) => { return [...
rival-black
rival-black6/28/2024

useDataGrid placeholderData

Can I use placeholderData with useDataGrid ``` queryOptions: { placeholderData: () => ({ data: {},...
rival-black
rival-black6/28/2024

useInfiniteList with useDataGrid

Is it possible to useInfiniteList with useDataGrid
flat-fuchsia
flat-fuchsia6/28/2024

how to avoid authentication state changes in inplementing register method in authprovider?

i am developing a user management application. i want to enable admin users to add general users, but when adding general users with authProvider.register(), the login user of the application becomes the newly added user. Is there a way to avoid this and remain as the admin user?