laravel-livewire-tables icon indicating copy to clipboard operation
laravel-livewire-tables copied to clipboard

Allow query for other column types

Open bumbummen99 opened this issue 2 years ago • 5 comments

All Submissions:

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. [x] Does your submission pass tests and did you add any new tests needed for your feature?
  2. [x] Did you update all templates (if applicable)?
  3. [x] Did you add the relevant documentation (if applicable)?
  4. [x] Did you test locally to make sure your feature works as intended?

Changes to Core Features:

  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ ] Have you written new tests for your core changes, as applicable?
  • [x] Have you successfully ran tests with your changes locally?

In case the ImageColumn or LinkColumn is not supposed to use the primary key of the row ImageColumn and LinkColumn can not be used right now, their field value is completely irrelevant. Added a check for field so that it will be queried too if set (why else would you set it for these columns):

            (new ImageColumn('Image', 'image'))
                ->location(function($row) {
                    return $row->image;
                })
                ->attributes(function($row) {
                    return [
                        'class' => 'w-8 h-8 rounded-full',
                    ];
                })

bumbummen99 avatar Apr 06 '22 22:04 bumbummen99

Can I have an example of why this is needed?

rappasoft avatar Apr 12 '22 23:04 rappasoft

Can I have an example of why this is needed?

My image can be a local file, an s3 temporary url or just any http* so just using ID does not work for me here. Actually the image property is an \Illuminate\Database\Eloquent\Casts\Attribute that does resolve to either one of the previously mentioned types. I fell back to creating my own column type before moving to another solution.

bumbummen99 avatar Apr 28 '22 16:04 bumbummen99

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 28 '22 17:05 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 05 '22 03:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '22 02:08 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 30 '22 05:09 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 06 '22 21:11 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 14 '22 06:12 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 20 '23 06:01 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 26 '23 21:02 stale[bot]