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] the input having ',' is breaking the filter OR #6705

Open
endrit-mesh opened this issue Mar 11, 2025 · 0 comments · May be fixed by #6708
Open

[BUG] the input having ',' is breaking the filter OR #6705

endrit-mesh opened this issue Mar 11, 2025 · 0 comments · May be fixed by #6708
Labels
bug Something isn't working

Comments

@endrit-mesh
Copy link

Describe the bug

Hi,

I'm having this problem where if I do a filter like this and the inputValue has a comma example:
"Iphone, Ipad"

is breaking the filter and I get this error

{
"code": "PGRST100",
"details": "unexpected "%" expecting letter, digit, "-", "->>", "->" or delimiter (.)",
"hint": null,
"message": ""failed to parse logic tree ((title.ilike.%Iphone, Ipad%,ean.ilike.%Iphone, Ipad%))" (line 1, column 29)"
}

{
        operator: "or",
        value: [
          { field: "title", operator: "contains", value: inputValue },
          { field: "ean", operator: "contains", value: inputValue },
        ],
      }

Steps To Reproduce

Create a search or simple filter and the value has a "," in the string is breaking the filter

Expected behavior

Get the objects that contains that input

Packages

{
"name": "refine-project",
"version": "0.1.0",
"private": true,
"type": "module",
"engines": {
"node": ">=20.5",
"yarn": "please-use-npm",
"npm": ">=9.8.0"
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/modifiers": "^7.0.0",
"@dnd-kit/sortable": "^8.0.0",
"@editorjs/editorjs": "^2.29.1",
"@editorjs/header": "^2.8.1",
"@meilisearch/instant-meilisearch": "^0.24.0",
"@monaco-editor/react": "^4.6.0",
"@react-querybuilder/antd": "^7.0.2",
"@react-querybuilder/dnd": "^7.0.2",
"@refinedev/antd": "^5.45.1",
"@refinedev/cli": "^2.16.42",
"@refinedev/core": "^4.57.5",
"@refinedev/devtools": "^1.2.12",
"@refinedev/kbar": "^1.3.14",
"@refinedev/react-router-v6": "^4.6.2",
"@refinedev/supabase": "^5.9.6",
"@rjsf/antd": "^5.17.1",
"@rjsf/core": "^5.17.1",
"@rjsf/utils": "^5.17.1",
"@rjsf/validator-ajv8": "^5.17.1",
"@sentry/react": "^8.9.2",
"@sentry/tracing": "^7.114.0",
"@sentry/vite-plugin": "^2.18.0",
"@tiptap/extension-placeholder": "^2.4.0",
"@tiptap/pm": "^2.4.0",
"@tiptap/react": "^2.4.0",
"@tiptap/starter-kit": "^2.4.0",
"@uiw/react-md-editor": "^3.19.5",
"antd": "^5.0.5",
"antd-style": "^3.6.1",
"dayjs": "^1.11.10",
"editorjs-html": "^3.4.3",
"i18next": "^23.10.0",
"i18next-browser-languagedetector": "^8.0.0",
"js-confetti": "^0.12.0",
"jwt-decode": "^4.0.0",
"lodash.debounce": "^4.0.8",
"mjml-browser": "^4.15.3",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"pdfjs-dist": "^4.10.38",
"rc-queue-anim": "^2.0.0",
"rc-scroll-anim": "^2.7.6",
"rc-tween-one": "^3.0.6",
"react": "^18.0.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.0.0",
"react-flow-builder": "^2.6.0",
"react-i18next": "^14.0.5",
"react-instantsearch": "^7.15.3",
"react-json-view-lite": "^1.4.0",
"react-querybuilder": "^7.0.2",
"react-router-dom": "^6.8.1",
"react-spreadsheet-import": "^4.6.1",
"recharts": "^2.15.0",
"use-key-hook": "^1.5.0"
},
"devDependencies": {
"@refinedev/devtools": "^1.2.9",
"@types/lodash": "^4.14.202",
"@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",
"cross-env": "^7.0.3",
"eslint": "^8.38.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"typescript": "^4.7.4",
"vite": "^4.3.1"
},
"scripts": {
"dev": "refine dev",
"build": "tsc && cross-env NODE_OPTIONS=--max_old_space_size=4096 refine build",
"preview": "refine start",
"refine": "refine",
"prepare": ""
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"refine": {
"projectId": "m5CFOK-FLhH7r-EYpiQH"
}
}

Additional Context

No response

@endrit-mesh endrit-mesh added the bug Something isn't working label Mar 11, 2025
enokryeziu added a commit to enokryeziu/refine that referenced this issue Mar 12, 2025
@enokryeziu enokryeziu linked a pull request Mar 12, 2025 that will close this issue
5 tasks
enokryeziu added a commit to enokryeziu/refine that referenced this issue Mar 13, 2025
@alicanerdurmaz alicanerdurmaz linked a pull request Mar 18, 2025 that will close this issue
5 tasks
@alicanerdurmaz alicanerdurmaz added this to the March 2025 Release milestone Mar 18, 2025
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

Successfully merging a pull request may close this issue.

2 participants