a year of active life with EditableColumns #1162
Replies: 3 comments 3 replies
-
Hey @Sladous I checked the fake in our demo. It's working without any issues. I wonder if you are calling the wrong method. Here is what the demo repo has: // demo fake editable_text column
CRUD::column('fake-text')
->label('Fake Text')
->type('editable_text')
->fake(true);
// demo fake editable_switch column
CRUD::column('fake-switch')
->label('Fake Switch')
->type('editable_switch')
->fake(true);
// demo fake editable_checkbox column
CRUD::column('fake-checkbox')
->label('Fake Checkbox')
->type('editable_checkbox')
->fake(true);
// demo fake editable_select column
CRUD::column('fake-select')
->label('Fake Select')
->type('editable_select')
->options(['one' => 'One', 'two' => 'Two', 'three' => 'Three'])
->fake(true); Further checking other issues. |
Beta Was this translation helpful? Give feedback.
-
Hey @Sladous Can you give more info on your 2nd point to understand it better? |
Beta Was this translation helpful? Give feedback.
-
About the @Sladous' 3rd point Correct way to solve it (because public function saveMinorUpdateEntry()
{
// Save the minor update
$entry = $this->crud->getModel()->find(request('id'));
$entry->{request('attribute')} = request('value');
// Perform specific logic
$entry->status = 'draft';
- return $entry->save();
+ return $entry;
+ // Alternatively, you can return a fresh entry if needed
+ // return $entry->refresh();
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've been using Backpack\EditableColumns with PHP: 8.1.10, Laravel: 10.48.22 for over a year.
EditableColumns is a great idea to improve the user interface. I have several problems with it:
Font formatting wrappers have already started working. Unfortunately, it cannot control the column width. Now I'm in a state where the single digit column is as wide as the long text.
It would be very nice if this worked:
'wrapper' => ['class' => 'form-group col-md-6'],
I have a localization problem. Instead of the decimal point "." we use ",". EditableColumns ignores the settings in the backpack.
Error persists with ->withFakes() in:
vendor\backpack\editable-columns\src\Http\Controllers\Operations\MinorUpdateOperation.php
It falls on:
Call member function withFakes() on bool
I solve it with the following modification:
protected function getMinorUpdateRow()
{
CRUD::setCurrentOperation('list');
$this->setupConfigurationForCurrentOperation();
// return CRUD::getEntriesAsJsonForDatatables([$this->minorUpdateEntry->withFakes()], 1, 1)['data'][0] ?? null;
return null;
}
Thank you for your time :-)
Beta Was this translation helpful? Give feedback.
All reactions