# Methods

Call methods on your instance using the [`ref`](http://vuejs.org/api/#ref) attribute.

* `setPage(page)`
* `setLimit(recordsPerPage)`
* `setOrder(column, isAscending)`
* `setFilter(query)` - `query` should be a string, or an object if `filterByColumn` is set to `true`.
* `resetQuery()` - Resets all query inputs (user-request filters) to empty strings.
* `getData()` Get table data using the existing request parameters. Server component only.
* `refresh()` Refresh the table. This method is simply a wrapper for the `serverSearch` method, and thus resets the pagination. Server component only
* `getOpenChildRows(rows = null)` If no argument is supplied returns all open child row components in the page. To limit the returned dataset you can pass the `rows` arguemnt, which should be an array of unique identifiers.
* `setCustomFilters(params)` set custom filters values. Expects an object with key-value pairs
* `resetCustomFilters()` (server component) resets all custom filters to `null`
* `getRequestParams()` (server component) get current request parameters
* `setRequestParams(params)` (server component) - see [here](/vue-tables-2/server-table/setting-multiple-request-parameters.md)
* &#x20;`downloadCsv(filename = 'table.csv')` (client component) - [premium version](https://xscode.com/matfish2/vue-tables-2) -  download CSV of current table state (i.e filtered and sorted, without pagination limit)

{% hint style="info" %}

* The `getOpenChildRows` method is only to be used when the child row is a **component**
* In order for this method to work you need to set the `name` property on your component to `ChildRow`
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://matanya.gitbook.io/vue-tables-2/methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
