Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #6290

Closed
Villva-vinoth opened this issue Sep 2, 2024 · 1 comment
Closed

[BUG] #6290

Villva-vinoth opened this issue Sep 2, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Villva-vinoth
Copy link

Villva-vinoth commented Sep 2, 2024

Describe the bug

Button disabled but it is working as it is

Steps To Reproduce

image

here the button is button but its working as its

Expected behavior

and this scenerios in case is i have a disabled button on edit but it is navigating and editing

---> https://example.mui.admin.refine.dev/stores/2/edit

EditButton in refine/mui --> gives this

Packages

{
"name": "ri-client",
"version": "0.1.0",
"private": true,
"type": "module",
"dependencies": {
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@mui/icons-material": "^5.8.3",
"@mui/lab": "^5.0.0-alpha.85",
"@mui/material": "^5.8.6",
"@mui/x-data-grid": "^6.6.0",
"@refinedev/cli": "^2.16.21",
"@refinedev/core": "^4.47.1",
"@refinedev/devtools": "^1.1.32",
"@refinedev/kbar": "^1.3.6",
"@refinedev/mui": "^5.14.4",
"@refinedev/react-hook-form": "^4.8.14",
"@refinedev/react-router-v6": "^4.5.5",
"@refinedev/simple-rest": "^5.0.1",
"axios": "^1.7.5",
"dayjs": "^1.11.13",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-hook-form": "^7.30.0",
"react-router-dom": "^6.8.1"
},
"devDependencies": {
"@types/node": "^18.16.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"@vitejs/plugin-react": "^4.0.0",
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"typescript": "^5.4.2",
"vite": "^4.3.1"
},
"scripts": {
"dev": "refine dev",
"build": "tsc && refine build",
"start": "refine start",
"refine": "refine"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},

}

Additional Context

No response

@Villva-vinoth Villva-vinoth added the bug Something isn't working label Sep 2, 2024
@WinnyBunny
Copy link

WinnyBunny commented Sep 2, 2024

If you want to disable button you have to add disabled attribute to the button.
add disabled={condition that will either be true or false} if you are using react.
below is your code which doesnt seem to have one.
image

@BatuhanW BatuhanW closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants