woocommerce/plugins/woocommerce-admin/client/lib/nav-utils
Kelly Dwan 7ecd6d160b Add mock product report, helper functions (https://github.com/woocommerce/woocommerce-admin/pull/387)
* Add a mock table to Products report

* Move onQueryChange to a helper function in nav-utils

* Add function to parse out ID lists from a query parameter

* Add a default value

Prevents undefined query params from erroring on the `.split`

* Use numberFormat rather than forcing type conversion, fix table header name

* Fix duplicate export caused by merge conflict
2018-09-17 12:50:20 -04:00
..
README.md Add ReportFilters Component 2018-08-15 11:15:30 +12:00
index.js Add mock product report, helper functions (https://github.com/woocommerce/woocommerce-admin/pull/387) 2018-09-17 12:50:20 -04:00

README.md

Nav Utils

This is a library of functions used in navigation.

getPath()

Get the current path from history.

getQuery()

Get the current query string, parsed into an object, from history.

JS version of admin_url. Returns the full URL for a page in wp-admin.

getNewPath( object: query, string: path, object: currentQuery )

Return a URL with set query parameters. Optional path, currentQuery, both will default to the current value fetched from history if not provided.

updateQueryString( object: query )

Updates the query parameters of the current page.