Replies: 2 comments
-
I have found by default it seems like a There might be a better way, but this feels like a bug as it took me awhile to figure out why the checkboxes weren't checked when the values clearly matched. Once I transformed it into a |
Beta Was this translation helpful? Give feedback.
-
Yes, I now have the same problem. After moving my code from React Final Form, I now need to create two types: one from the backend (GraphQL) and one for FormData. I need to convert the data for the form and, after editing, convert it back. Not Mohamed comes to the mountain, no the mountain must come to Mohamed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I apologize for my bad English. I have a problem: I'm writing filters for an online store, I use react-hook-form to make my form easy to use. There are three filters: price (from and to), rating (from and to), list of categories (lots of checkboxes). The first two filters are ok, but the third one is a problem. I need to get an array of category ids (numbers), but I get an array of strings. Although I have a function that leaves only the values I entered (dirty values) in the final object with filters, I don't want to run through the array in it, because it's wrong and kills scalability.
My code:
FiltersLayout.tsx
CategoriesFilter.tsx
CategoryCheckbox.tsx
The form object I get after I select a few categories:
I want to:
Beta Was this translation helpful? Give feedback.
All reactions