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

columnActions add some jsExpression to it ? #19

Open
rapgithub opened this issue Aug 30, 2018 · 0 comments
Open

columnActions add some jsExpression to it ? #19

rapgithub opened this issue Aug 30, 2018 · 0 comments

Comments

@rapgithub
Copy link

rapgithub commented Aug 30, 2018

is it possible to create columnActions in conjunction with jsExpression in my case I need a new icon per row that when clicked goes to another page and send the data id reference of the row as a parameter...

I tried to use this in my model and does not work, it gives me error all the time...

'columnActions'=>[
    'Link'=>['icon'=>'database'],
            new \atk4\ui\jsExpression('document.location = go.php?q=1', [$crud->jsRow()->data('id')])        ],

I tried to add it like this and shows the icon well but when click it opens a modal popup and spinning loader in the middle and stop there... it does not execute the Alert as JS...

$m = $crud->setModel(new Users($app->db),
[
    'columnActions'=>[
        'Action'=>['jsExpression'=>new \atk4\ui\jsExpression('alert([])', ['The wait is over']),'icon'=>'database']

       ],
...

any ideas?
thanks

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