AntDesign: Conditionally show form fields
What's the easiest way to show/hide another form field based on whether another is true or false? If Field A is true, Field B should be visible. If Field B is false, Field B should have it's value set to null and be hidden.
```tsx
const { formLoading, formProps, onFinish, saveButtonProps, queryResult } = useForm<IOnboardingChecklist>({...
watching varying fields (by registered name) causes app to slow down
i have a very complicated advanced edit form. i want to not show some fields depending on other's value. for that im using the watch api from react-hook-form. the problem is that since my form is nested im registering some fields by their index in the array. if there will be 5 of them my utility function registers them like this
a.b.0.visa_req
a.b.1.visa_req
a.b.2.visa_req
a.b.3.visa_req...
auth with AWS Appsync GraohQL API
I am trying to connect my refine application to an AWS APpsync GraphQL API.
how can i do so?
here is my authprovider.ts code...
How can i assign a user role following the refine week pixels guide?
I'm currently working on managing user roles within my application, specifically targeting users' roles on Supabase. While I've been following the Pixel Guide, I noticed that there's no explicit mention of how to access or modify a user's role within the application itself.
Could anyone please provide some guidance on how to achieve this?
Is there a recommended approach for changing a user's role within my application? The guide only mentions the set_claim method (set_claim('user_id', 'role', '"admin"')) for role changes through Supabase SQL, but I'm unsure about the overall process of integrating this into my app's logic?...
How to delete replaced picture in AntD
I know action props is an endpoint to upload the image. OnRemove props will trigred when remove button clicked and i call my delete image endpoint on there. but how to call delete endpoint when the file being replaced when i set maxCount={1}. What i need is to access old file name to sent to my delete endpoint to delete my uploaded image after new file is being added.
AuthProvider with Spring Boot
Hello, I've just recently started playing around with React in general and Refine. I'm trying to connect the starter app's login page with a Spring Boot backend to initially authenticate and I'm having some trouble. I was able to get my data provider seemingly setup correctly (just using the simple-rest provider that comes with Refine out of box) and was able to fetch some data without issue. But the login method on my AuthProvider keeps returning an error and I'm not sure why. On the Spring Boot side of things, I added some debug output in and can see that I'm getting a server hit, but there's no content being passed in the body of the request (which I imagine makes Spring boot discard it as a bad request since it can't match to the exposed method which is expecting an email address). My AuthProvider is attached below - any insight into why its not passing anything?
```export const authProvider: AuthBindings = {
login: async ({ email }) => {
try {...
Make sum of rows
In my "invoice-itens" resource, I wan to to sum all data from "subtotal" row. How to do that?
How can I watch other directories to trigger hot reload
I have another directory parallel to my main refine app which I include in package.json using the "file ../xxx" syntax. I would like the server to hot reload when I make a change to any file in that other directory. Is there a way to extend what directories are "watched"?
header token auth is not sending in request header
I've got this code import React from "react";
import { DataProvider } from "@refinedev/core";
import axios from "axios";
const axiosInstance = axios.create();...
Auth token is not being sended to backend
I've implemented this to get auth token from frontend to backend, but in backend it does not receive refine_auth in req.header:
How can I add other form fields on Auth Pages?
Can someone help. How can I add other fields on Auth Pages. At the moment it only has options for email and password what if one needs more. Would I have to use the render component and do it from scratch or there is some prop for that?
How to make Inferencer automatically generate the fields for the form?
Hello, I hope everyone is doing great today!
I am struggling and confused with a minor problem with the Inferencer, and I need help and insights on this.
I'm using the inferencer, particularly the MUI inferencer, to automatically generate route pages like create, update, list, etc. However, unlike the example provided in the sandbox documentation, my inferencer isn't automatically generating the required fields. I've tried adding meta props and specifying the fields manually, but it's not working as expected....
Supabase Environment Variables will not work
I am trying to change the default Supabase client code in Refine to use environment variables stored in either .env or .env.local and no matter how I try, they always remain undefined. Even though this is a recommended change on the Refine docs.
"You can also use environment variables to store your Supabase URL and key. This is a good practice to keep your sensitive information safe."
Code is below. Ran using "npm run dev". File is: supabase-client.ts...
Appwrite permissions
I use Refine with Appwrite as backend and Antd.
I have seen how to add document permissions when creating or editing documents https://refine.dev/docs/data/packages/appwrite/#create-page
But there are things that remain unclear:
...
How can I populate a resource before passing to Inferencer?
Strapi v4 data by default doesn't even show relations/nested fields at all.
When passing into inferencer, how can I have inferencer populate the resource before "inferencing?"
I am using AntDesign...
LDAP Auth
Hi everyone, i am new in the domain, and i need to auth my users thanks to an existing active directory with LDAP protocol but i don't know how i can do with refine, which auth service to use ... TY
Refine DevTools not working
Hello! I've tried doing my homework before asking this question. But I can't seem to get the Refine DevTools working:
- I've upgraded to the latest Refine packages (including DevTools)
- I've wrapped my
Refine component in DevtoolsProvider and added DevtoolsPanel to my app
- I'm starting the dev server with refine dev NOT refine start...