How to check user input is a valid column before appending condition?
Does anyone knows the proper way to do so?
3 Replies
Can you show the how you defined the columnFilters variable?
Basically, rather than
string
, the filter.column
property should be of type keyof typeof tasks["_"]["columns"]
. For example:![No description](https://cdn.answeroverflow.com/1258625320441876593/CleanShot_2024-07-04_at_22.27.222x.jpg)
suer, here is the definition, seems I have to make this generic to fit other table as well, thank you