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:
suer, here is the definition, seems I have to make this generic to fit other table as well, thank you