Sort a table by drop down values (simplify my code)

前端 未结 4 1952
小蘑菇
小蘑菇 2021-01-23 17:37

I have a table. I want the user to be able to be able to filter the table by the option they pick in a given drop down. I have it working, but it\'s messy and hard to add new ro

4条回答
  •  走了就别回头了
    2021-01-23 17:50

    You should check out DataTables, it has this kind of filtering built in (fnFilter in the API)

    It might be a bit of a learning curve at first, but will be much more flexible in the end.

提交回复
热议问题