From 6e3261989dd5dce78ff0ec9ca16fda909dd628ff Mon Sep 17 00:00:00 2001 From: khoirul anam Date: Mon, 23 Jan 2017 08:22:45 +0700 Subject: [PATCH] Update Documentation --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8c2c7f6..52790f9 100755 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Property example : ```php field($model, 'attribute1')->widget(Select2::className(), [ 'items' => ['first' => 'First Option', 'second' => 'Second Option', 'third' => 'Third Option'], @@ -92,12 +92,12 @@ example for use a `function` or `object` type : 'function format(state) { if (!state.id) return state.text;return "" + state.text;}', + 'formatResult' => new JsExpression('function format(state) { if (!state.id) return state.text;return "" + state.text;}'), //call existing function - 'formatSelection' => 'js:formatSelection()', + 'formatSelection' => new JsExpression('formatSelection()'), //object - 'data' => 'js:[{id:0,text:"enhancement"},{id:1,text:"bug"},{id:2,text:"duplicate"},{id:3,text:"invalid"},{id:4,text:"wontfix"}]', + 'data' => new JsExpression('[{id:0,text:"enhancement"},{id:1,text:"bug"},{id:2,text:"duplicate"},{id:3,text:"invalid"},{id:4,text:"wontfix"}]'), ]); ```