You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2017/12/20 16:50:07 UTC
[cordova-plugin-contacts] branch master updated: CB-13693: Improves
Documentation (#162)
This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-contacts.git
The following commit(s) were added to refs/heads/master by this push:
new b5888c8 CB-13693: Improves Documentation (#162)
b5888c8 is described below
commit b5888c88437bf74c5d9c150166dc600ad4c0b48b
Author: DanWithams7d <da...@7d-digital.co.uk>
AuthorDate: Wed Dec 20 16:50:04 2017 +0000
CB-13693: Improves Documentation (#162)
The explanation of the contactFields argument in the 'navigator.contacts.find' section is unclear and ambiguous. Updating to make it clearer to people wanting to utilise this plugin.
---
README.md | 8 ++++----
types/index.d.ts | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 454a028..3e7520a 100644
--- a/README.md
+++ b/README.md
@@ -165,10 +165,10 @@ device contacts database and returning an array of `Contact` objects.
The resulting objects are passed to the `contactSuccess` callback
function specified by the __contactSuccess__ parameter.
-The __contactFields__ parameter specifies the fields to be used as a
-search qualifier. A zero-length __contactFields__ parameter is invalid and results in
-`ContactError.INVALID_ARGUMENT_ERROR`. A __contactFields__ value of
-`"*"` searches all contact fields.
+The __contactFields__ parameter should always be an array and specifies the
+fields to be used as a search qualifier. A zero-length __contactFields__
+parameter is invalid and results in `ContactError.INVALID_ARGUMENT_ERROR`.
+A __contactFields__ value of `["*"]` searches all contact fields.
The __contactFindOptions.filter__ string can be used as a search
filter when querying the contacts database. If provided, a
diff --git a/types/index.d.ts b/types/index.d.ts
index f0979ba..3812c70 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -23,9 +23,9 @@ interface Contacts {
* The navigator.contacts.find method executes asynchronously, querying the device contacts database
* and returning an array of Contact objects. The resulting objects are passed to the onSuccess
* callback function specified by the onSuccess parameter.
- * @param fields The fields parameter specifies the fields to be used as a search qualifier,
- * and only those results are passed to the onSuccess callback function. A zero-length fields parameter
- * is invalid and results in ContactError.INVALID_ARGUMENT_ERROR. A contactFields value of "*" returns all contact fields.
+ * @param fields The fields parameter should always be an array and specifies the fields to be used
+ * as a search qualifier. A zero-length fields parameter is invalid and results in ContactError.INVALID_ARGUMENT_ERROR.
+ * A fields value of ["*"] searches all contact fields.
* @param onSuccess Success callback function invoked with the array of Contact objects returned from the database
* @param onError Error callback function, invoked when an error occurs.
* @param options Search options to filter navigator.contacts.
--
To stop receiving notification emails like this one, please contact
['"commits@cordova.apache.org" <co...@cordova.apache.org>'].
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org