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

CRUD: display delete button for some entries only based on a condition #16

Closed
luya-bot opened this issue Dec 18, 2017 · 3 comments
Closed
Assignees

Comments

@luya-bot
Copy link

This issue has originally been reported by @kogli at luyadev/luya#1360.
Moved here by @nadar.


There is currently no way to show the delete button in ngRest CRUD for some entries only, based on a condition.

This would be useful when, for example, some entries were tied to other entries in other tables. Currently, the button is either shown or hidden for all entries.

I tried replacing ['delete', true] with something like ['delete', $this->id == 2], but to no avail - when ngRestScopes() is called, values of the Model instance are not populated: $this->id is null, so $this->id == 2 returns false.

@nadar
Copy link
Contributor

nadar commented Dec 18, 2019

I am going to close this issue because:

  • Missing information's
  • No more activity
  • No one picked up the task (no Pull Request recieved)

If you think this is still important or there are more/new informations. Please reopen the issue and let us know.

If this is a problem or a feature you like to discuss, join our slack team: slack.luya.io. We try to keep our issue tracker as clean as possible in order to focus on active issues.

@rochdi80tn
Copy link
Contributor

I've come up with a solution and I would like to share (already did it but with missing tests)
How can I open this ?

@nadar
Copy link
Contributor

nadar commented Mar 12, 2021

Hi @rochdi80tn just create a pull request and refer to this issue if you like

@rochdi80tn rochdi80tn mentioned this issue Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants