You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 - whenngRestScopes()
is called, values of the Model instance are not populated:$this->id
isnull
, so$this->id == 2
returnsfalse
.The text was updated successfully, but these errors were encountered: