Build a search bar and table using the provided data, and explain your approach to filtering and rendering results.
Implement the filtering logic as a function. The function receives a list of row dictionaries, a search query, and the column names to search. Split the query into whitespace-separated terms and return rows where every term appears in at least one selected column, using case-insensitive substring matching. Preserve the original row order. An empty or whitespace-only query returns all rows. The returned rows represent the data the table should render.
def filter_rows(data, query, columns):