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

Resolve exception for search on json columns on a relationship #15139

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

Conversation

dododedodonl
Copy link
Contributor

@dododedodonl dododedodonl commented Dec 19, 2024

Used code

Using this snippet, a table can display the json columns content (only present in 1 of the 4 rows):

Tables\Columns\TextColumn::make('contactDetailSubmission.data.name')
    ->searchable()
    ->label(__('Name')),
  • contactDetailSubmission is a relationship
  • data.name is the name field in the data JSON column

afbeelding

Problem

However, when searching (eg. g), this produces an exception:
afbeelding

Result after change

This fix resolves the exception while preserving the original behavior:
afbeelding

Visual changes

--

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@dododedodonl dododedodonl changed the title Make search work for json columns on a relationship Resolve exception for search on json columns on a relationship Dec 19, 2024
@danharrin danharrin added the bug Something isn't working label Dec 19, 2024
@danharrin danharrin added this to the v3 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants