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

[Bug] Editable column is not working in show operation #5754

Open
blessen131 opened this issue Jan 22, 2025 · 3 comments
Open

[Bug] Editable column is not working in show operation #5754

blessen131 opened this issue Jan 22, 2025 · 3 comments
Assignees
Labels

Comments

@blessen131
Copy link

blessen131 commented Jan 22, 2025

Then editable column feature is not working as expected when using the show operation. I've reviewed the demo app(https://demo.backpackforlaravel.com/admin/editable-monster/140/show) and it appears to be behaving in the same way.

How to hide editable column?
I was trying to hide column if completed is true
$this->crud->addColumn([
'name' => 'completed',
'label' => 'Status',
'type' => 'editable_switch',
'priority' => 5,
'visible' => function ($entry) {
if ($entry->completed) {
return false;
}
return true;
}
]);

"backpack/crud": "^5.6",
"backpack/editable-columns": "^2.1",

Copy link

Based on the knowledge sources provided, it appears that the editable columns feature is not designed to work in the show operation of Backpack. The editable columns are primarily intended for use in the list operation.

According to the Editable Columns documentation, the editable columns feature adds functionality for quick edits directly from the table view. The documentation specifically mentions its use in the list operation and does not indicate support for the show operation.

Additionally, the changelog for Editable Columns version 1.0.5 mentions "Make editable columns work in show operation" as a feature. However, this appears to be an older version, and the current behavior you're observing in the demo suggests that this functionality may not be fully implemented or maintained in more recent versions.

It's worth noting that the show operation typically displays detailed information about a single entry, while editable columns are designed for quick edits across multiple entries in a list view.

If you need to edit fields in the show operation, you might want to consider using regular fields instead of editable columns, or implement a custom solution for inline editing in the show view.

If you believe this is a bug or unexpected behavior in the latest version of Backpack, I recommend reporting it on the Backpack GitHub issues page for further investigation by the developers.

ℹ️ Please note our AI Bot does not reply to follow-ups, this will be the only AI answer in this thread. If the AI helped you find the answer, please mark it as answered or write details below so it can learn. Then close the conversation. If not, please give more information for when a human reads this. ℹ️

Relevant sources:

Github Issue (closed): Can't edit colums in setupShowOperation
Editable Columns|1.0.5 01-Dec-2021
Github Issue (closed): [Editable Columns][Feature Request] Support Details Row, Reponsive Modal and ShowOperation
Github Issue (closed): Preview on data table v4.0
Github Issue (closed): [Bug] removeColumn() doesn't work in setupShowOperation()
Github Issue (closed): removeField doesnt seem to work
Github Issue (closed): [Bug] editable_switch
Github Issue (closed): [Editable Columns][Bug] - reserved word "action" in text field
Editable Columns|Editable Columns
Github Issue (closed): Call to undefined method App\Models\ChangeRequest::changeable_id()
Editable Columns|Editable Columns
Github Issue (closed): [Bug] Call to a member function withFakes() on bool
Github Issue (closed): Backpack demo issue
Github Issue (closed): Preview Button is not appearing i.e. ShowOpertaion is not working as expected in Backpack 4.0V
Github Issue (closed): [Bug] Search not working when list has editable columns

@jcastroa87
Copy link
Member

Hello @blessen131

I will check about it and let you know the result. In any case, I notice you have an old version of CRUD and editable columns, will you update to the latest one? Because in case of pushing, an update will be for the latest version.

Cheers.

@jcastroa87 jcastroa87 self-assigned this Jan 27, 2025
@jcastroa87
Copy link
Member

Hello @blessen131 thanks for bringing this to us, now we are working in a PR to enable it on the next release.

Cheers.

@jcastroa87 jcastroa87 moved this to Needs Testing, Review or Docs in This week Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Testing, Review or Docs
Development

No branches or pull requests

2 participants