primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Column: FilterMatchModeOptions example

Open m-ivanova opened this issue 4 years ago • 7 comments

I'm submitting a ... (check one with "x")

[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports) https://codesandbox.io/s/primereact-dialog-dropdown-issue-forked-ycg9td?file=/src/App.tsx

Current behavior Can not compile code when trying to use custom filterMatchModeOptions

Expected behavior Code to be compiled without errors and options to be rendered

Minimal reproduction of the problem with instructions Use primereact version 7.2.1 => recreate code from codeSandbox Code cant be compiled

Please tell us about your environment:

Versions: "primereact": "7.2.0", "react": "17.0.2",

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

m-ivanova avatar Apr 06 '22 14:04 m-ivanova

Isn't' that similar to this old PR: https://github.com/primefaces/primereact/pull/2489/files

I think he shows how to properly use Typescript with Datatable.

melloware avatar Apr 06 '22 15:04 melloware

Okay, could you please show me how to use it. Since it is not a warning but an error, I can not compile the code and therefore can not use this property.

m-ivanova avatar Apr 08 '22 09:04 m-ivanova

try this...

filterMatchModeOptions={{ label1: "value1", label2: "value2" }}

melloware avatar Apr 08 '22 12:04 melloware

I did... no success

изображение

m-ivanova avatar Apr 08 '22 12:04 m-ivanova

yeah but you were just stating that the compilation failed it was because your key value pairs were not defined correctly

melloware avatar Apr 08 '22 12:04 melloware

You are right I think a showcase example is needed on how to use this. I don't think this feature is yet complete.

melloware avatar Apr 08 '22 12:04 melloware

Hi, I couldn't replicate it. Could you please try the latest version? Screen Shot 2022-04-10 at 17 28 26

Also, the ts warning issue has been fixed in 8.0.0-rc.2 and Doc has been updated.

For now, closed. If the problem persists, please reopen this issue. Best Regards,

mertsincan avatar Apr 10 '22 16:04 mertsincan