Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo code for typeahead is in incorrect style/syntax. #375

Open
17 tasks
bscheshirwork opened this issue Jan 30, 2019 · 1 comment
Open
17 tasks

Demo code for typeahead is in incorrect style/syntax. #375

bscheshirwork opened this issue Jan 30, 2019 · 1 comment

Comments

@bscheshirwork
Copy link

bscheshirwork commented Jan 30, 2019

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of yii2-widgets.
  • This is not an usage question. I confirm having gone through and read the documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

Steps to reproduce the issue

  1. http://demos.krajee.com/widget-details/typeahead#settings
  2. Scroll to pluginEvents

Expected behavior and actual behavior

When I follow those steps, I see...

pluginEvents = [
    "typeahead:active" => "function() { log("typeahead:active"); }",
    "typeahead:idle" => "function() { log("typeahead:idle"); }",
    "typeahead:open" => "function() { log("typeahead:open"); }",
    "typeahead:close" => "function() { log("typeahead:close"); }",
    "typeahead:change" => "function() { log("typeahead:change"); }",
    "typeahead:render" => "function() { log("typeahead:render"); }",
    "typeahead:select" => "function() { log("typeahead:select"); }",
    "typeahead:autocomplete" => "function() { log("typeahead:autocomplete"); }",
    "typeahead:cursorchange" => "function() { log("typeahead:cursorchange"); }",
    "typeahead:asyncrequest" => "function() { log("typeahead:asyncrequest"); }",
    "typeahead:asynccancel" => "function() { log("typeahead:asynccancel"); }",
    "typeahead:asyncreceive" => "function() { log("typeahead:asyncreceive"); }",
];

I was expecting...

                        'pluginEvents' => [
                            "typeahead:active" => "function() { console.log(\"typeahead:active\"); }",
                            "typeahead:idle" => "function() { console.log(\"typeahead:idle\"); }",
                            "typeahead:open" => "function() { console.log(\"typeahead:open\"); }",
                            "typeahead:close" => "function() { console.log(\"typeahead:close\"); }",
                            "typeahead:change" => "function(e, suggestion) { console.log(\"typeahead:change\", e, suggestion); }",
                            "typeahead:render" => "function() { console.log(\"typeahead:render\"); }",
                            "typeahead:select" => "function() { console.log(\"typeahead:select\"); }",
                            "typeahead:autocomplete" => "function() { console.log(\"typeahead:autocomplete\"); }",
                            "typeahead:cursorchange" => "function() { console.log(\"typeahead:cursorchange\"); }",
                            "typeahead:asyncrequest" => "function() { console.log(\"typeahead:asyncrequest\"); }",
                            "typeahead:asynccancel" => "function() { console.log(\"typeahead:asynccancel\"); }",
                            "typeahead:asyncreceive" => "function() { console.log(\"typeahead:asyncreceive\"); }",
                        ],

also
include to example a function arguments
is better

Environment

Browsers

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • Mac OS X
  • Linux
  • Mobile

Libraries

  • jQuery version:
  • yii2-widgets version:

Isolating the problem

  • This bug happens on the demos page
  • The bug happens consistently across all tested browsers
  • This bug happens when using yii2-widgets without other plugins.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@bscheshirwork
Copy link
Author

Same situation on another pages
http://demos.krajee.com/checkbox-x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant