Amir Hossein Hashemi
Amir Hossein Hashemi
Explore posts from servers
SSolidJS
Created by Amir Hossein Hashemi on 2/13/2025 in #support
I can't initialize a session
Thanks, deferStream = true fixed the error.
4 replies
SSolidJS
Created by Amir Hossein Hashemi on 2/4/2025 in #support
Using useNavigate within client-only action/query
Thanks
8 replies
SSolidJS
Created by Amir Hossein Hashemi on 2/4/2025 in #support
Using useNavigate within client-only action/query
If yes, why?
8 replies
SSolidJS
Created by Amir Hossein Hashemi on 2/4/2025 in #support
Using useNavigate within client-only action/query
So I cannot use useNavigate with query or action at all?
8 replies
SSolidJS
Created by Amir Hossein Hashemi on 12/31/2024 in #support
Why submission result doesn't update?
This way [I think] we lose progressive enhancement and it's a lot of code compared to using action. Maybe a better approach would be to always return something from the action if the result is used:
const addPost = action(async (formData: FormData) => {
const title = formData.get("title") as string;
if (!title || title.length < 4) {
return {
isError: true,
error: "Title must be at least 4 characters",
};
}
return { isError: false }; // <- added this
}, "addPost");
const addPost = action(async (formData: FormData) => {
const title = formData.get("title") as string;
if (!title || title.length < 4) {
return {
isError: true,
error: "Title must be at least 4 characters",
};
}
return { isError: false }; // <- added this
}, "addPost");
8 replies
SSolidJS
Created by Amir Hossein Hashemi on 12/31/2024 in #support
Why submission result doesn't update?
Thank you @peerreynders for your informative response.
So you should get into the habit on clearing submissions that carry data (error or result) once you've retained the necessary information in order to not be confused by stale entries later on.
Can you please explain how this should be done in my example code? I'm aware of the clear method, but I don't know the best practice on where to call it.
8 replies
RRefine
Created by sunny-green on 11/8/2023 in #ask-any-question
How to disable authentication in a page?
@kapa.ai The window object is not available in the server. Considering I'm using SSR this might be a problem
12 replies
RRefine
Created by gradual-turquoise on 11/8/2023 in #ask-any-question
How to disable authentication in a page?
@kapa.ai I want to completely disable authentication for a specific page. What should I do?
12 replies
RRefine
Created by metropolitan-bronze on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
Hey @Omer . Thank you for the help. I was going to open an Issue but I saw a commit that addresses it. Looking forward for it being shipped in the next release.
26 replies
RRefine
Created by fascinating-indigo on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai No I don't call any auth-provider's method in my data-provider. I have an access-control-provider too but it also doesn't use auth-provider's methods
26 replies
RRefine
Created by ratty-blush on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai What do you mean by "specific behavior of your data provider or auth provider." This is my auth-provider:
26 replies
RRefine
Created by raw-harlequin on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai I've narrowed down the issue to the useDelete hook. I don't render anything else in the screen but still the ["getUserIdentity"] query is being called for each button.
26 replies
RRefine
Created by fair-rose on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai But I'm not using <Edit> and any component from the component libraries that refine supports. Anywhere else uses meta.canDelete ?
26 replies
RRefine
Created by genetic-orange on 10/20/2023 in #ask-any-question
Why useDelete calls getIdentity from auth-provider?
@kapa.ai I'm not using the <DeleteButton> component and I'm not using useCan or useIdentity in a relevant component. But in the docs you pass a meta.canDelete property to resources prop in the <Refine> component. I've removed it. Could it be the cause of the problem?
26 replies
RRefine
Created by other-emerald on 1/6/2023 in #ask-any-question
Reducing bundle size
10 replies
RRefine
Created by rising-crimson on 1/6/2023 in #ask-any-question
Reducing bundle size
Sure
10 replies
RRefine
Created by foreign-sapphire on 1/6/2023 in #ask-any-question
Reducing bundle size
But it's not possible with @pankod/refine-mui. Does that effect the bundle size? I guess tree-shaking takes care of that but I'm not sure.
10 replies
RRefine
Created by harsh-harlequin on 1/6/2023 in #ask-any-question
Reducing bundle size
import Button from "@pankod/refine-mui/Button";
import Button from "@pankod/refine-mui/Button";
10 replies
RRefine
Created by xenophobic-harlequin on 1/6/2023 in #ask-any-question
Reducing bundle size
but material ui suggests to import it with default export to reduce the bundle size:
10 replies
RRefine
Created by rare-sapphire on 1/6/2023 in #ask-any-question
Reducing bundle size
import { Button } from "@pankod/refine-mui";
import { Button } from "@pankod/refine-mui";
10 replies