Refine

R

Refine

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

Join

ask-any-question

discussions

frozen-sapphire
frozen-sapphire2/11/2024

Unable to proceed from login page

I am busy with crm-example and i have just did the auth provider, and also finished adding it to my app. When i click the login button, the page just, nothing is routed to my Outlet component
frozen-sapphire
frozen-sapphire2/11/2024

Refine, unable to login.

My page can't seem to route to the next page even though the correct loguin details are entered, it just remains on the login page.
No description
plain-purple
plain-purple2/10/2024

Auto fill fields

How to fill fields of a populated data. Ex: I have two resources, one is "products" and the other is "sells" that has relation with products . How to retrieve or appear the price of the product in the create form when selectProps is called...
plain-purple
plain-purple2/10/2024

Table selection

How to use delete action on selected line with table selection in ant design
secure-lavender
secure-lavender2/10/2024

Need sample of useCustom hook

is there any sample how to use useCustom hook?
plain-purple
plain-purple2/10/2024

useSelect/Radio

How to use useSelect to whith ant Radio?
like-gold
like-gold2/9/2024

Firebase integration

Wanted to make this thread to point a few things for future devs looking to use firebase with the recommended data provider from https://github.com/resulturan/refine-firebase This repo is a little outdated and made for refine 3.x so to use it in 4.x you wither use legacyAuthProvider instead of the normal authProvider or fork the repo and make your own changes according to https://refine.dev/docs/migration-guide/auth-provider/#motivation-behind-the-changes which is the path i took. Regarding firestore the basic getList, getOne etc. seem to be working but there are a lot of bugs if you want to use custom logic. These bugs come from trying to use the firestore module along with refine-firebase which don't seem to want to communicate ( trying to access database from refine-firebase and using custom functions). What i ended up doing was importing any functions i needed like getCountFromServer or the aggregations form recent versions of firestore in the fork of refine-firebase and used it from there. My version of refine-firebase is @armable/refine-firebase using firestore 10.8.0....
continuing-cyan
continuing-cyan2/9/2024

React Admin Dashboard

Hi, I am building the React Admin Dashboard, and the nested Routes are not working. The EditButton does not open a new route of http://localhost:5173/companies/edit/1 and http://localhost:5173/task shows an error of No routes matched location "/task" . Am I missing something?
frail-apricot
frail-apricot2/9/2024

[crm-example] Where is the logic of subscription call from UI

Hi all, I discovered Refine few months ago and really like the way it's draws the best practices to build enterprise grade app. I am currently exercising myself with crm-example and would love to have answer from someone regarding where the subscription operations are called specifically in the example, could someone tell me?...
afraid-scarlet
afraid-scarlet2/9/2024

useForm disable useOne

Hello i read the docs and the edit action is calling automatically useOne(), is any method to disable this useOne hook ?
apparent-cyan
apparent-cyan2/9/2024

useList

use list hook queryoptions do filtering on client side
dependent-tan
dependent-tan2/9/2024

Infinite rerenders useIsAuthenticated inside of Authenticated component

In the following thread this is addressed: https://discord-questions.refine.dev/m/1189348609368531035 There were no updates on any fixes, the problem is still happening and requires for components that call useIsAuthenticated to not live inside of authenticated routes, which requires work-arounds for some logic. The current docs also only state the usage of checking the isAuthenticated context within public pages, but this may also be relevant for authenticated pages; https://refine.dev/docs/authentication/hooks/use-is-authenticated/...
dependent-tan
dependent-tan2/9/2024

Cannot find module '@hooks' or its corresponding type declarations.

Hello everyone, I think many have encountered a similar error, please tell me what to do... ./node_modules/@refinedev/core/src/components/pages/login/index.tsx:3:40 Type error: Cannot find module '@hooks' or its corresponding type declarations....
fair-rose
fair-rose2/9/2024

No QueryClient set, use QueryClientProvider to set one

// Package Imports import React, { createContext, useContext, useState } from 'react'; // Project Imports import type ResourceItem from 'interfaces/resource';...
adverse-sapphire
adverse-sapphire2/8/2024

Translate errors inside authProvider

I have error handling in the authProvider and I would like to allow errors to be translated.
adverse-sapphire
adverse-sapphire2/8/2024

How to use providers property on AuthPage

How do you actually use it? I specified google like this ```js { name: "google", label: translate("pages.login.providers.google", "Sign in with Google"),...
genetic-orange
genetic-orange2/8/2024

Swizzle bug - Edit button

Creating a new Ant Design Edit Button using swizzle causes a bug on line 105:
105 className={RefineButtonClassNames.EditButton}
105 className={RefineButtonClassNames.EditButton}
The error is the following:...
adverse-sapphire
adverse-sapphire2/8/2024

How can I show a success message on successfull registration?

I want the user to confirm their email before allowing them to login, but I need to communicate that to the user somehow, so is it possible to show a notification when registration was successfull (my user is being redirected to login)
genetic-orange
genetic-orange2/8/2024

Set type of table record using useTable

How do I set a type to my table records? I'm currently using Ant Design and the useTable() hook. What changes do I need to make in order to avoid the error commented in my code snippet? ```tsx const { tableProps } = useTable({ syncWithLocation: true,...
funny-blue
funny-blue2/8/2024

Can you use useOne and have it call a callback when the data changes

I saw onLiveUpdate but i don't have a live provider so I'm not sure if that's going to do what I want. Basically I want to have a function called when the data from the hook is available so I can update a separate store with information derrived from the value. I saw "queryOptions.onSuccess" which could do what I want but it seems to be deprecated. I'm trying to avoid 'useEffect'....