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

Getting no function clause matching in Exzeitable.HTML.Search.build/1 when trying to build a table #293

Closed
mja00 opened this issue Aug 11, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@mja00
Copy link

mja00 commented Aug 11, 2021

Describe the bug
When using the example code in the readme I get no function clause matching in Exzeitable.HTML.Search.build/1 whenever I try to render the page.

To Reproduce
Steps to reproduce the behaviour:

  1. Follow example code to create a table replacing all needed information with what is needed
  2. Navigate to page
  3. Get error

Expected behaviour
Page draws table

Screenshots
image

Additional context
Below is the code in my live_view module.

defmodule GlimeshWeb.GctLive.Components.AuditLogTableNew do

  alias GlimeshWeb.Router.Helpers, as: Routes
  import Ecto.Query

  use Exzeitable,
    # Required
    repo: Glimesh.Repo,
    routes: Routes,
    path: :gct_path,
    query: from(a in Glimesh.CommunityTeam.AuditLog),
    fields: [
      target: [label: "Target"]
    ]


  # The callback that renders your table
  def render(assigns) do
    ~L"""
    <%= build_table(assigns) %>
    """
  end
end
@mja00 mja00 added the bug Something isn't working label Aug 11, 2021
@alanvardy
Copy link
Owner

Thank you for the bug report @mja00! On first look it seems like adding the :debounce option to your use Exzeitable call could resolve the issue.

I will look into this in the next couple of days and keep you updated :)

@mja00
Copy link
Author

mja00 commented Aug 19, 2021

I did have it there from the beginning, I was basically just pasting the example in and changing the needed vars, and it was still throwing that error. It looks like for some reason the assigns aren't being assigned so it can't build it for some reason.

@alanvardy
Copy link
Owner

I'm having trouble reproducing this on my end @mja00, I see that this is for an open source project. Would you be able to push this code up to a branch so I can walk though it?

@mja00
Copy link
Author

mja00 commented Aug 21, 2021

Sure thing. I'll get a branch with it running and send a message once it's up.

@alanvardy
Copy link
Owner

Closing due to lack of activity but feel free to reopen if you like @mja00 !

@atavistock
Copy link

I'm seeing the same, with or without debounce set in the use keywords.

@alanvardy
Copy link
Owner

I'll take a look, are you able to provide a reproducible example @atavistock ?

@alanvardy alanvardy reopened this May 2, 2022
@atavistock
Copy link

It seems to be because of #374

debounce never gets into assigns, it also looks like other assigns from the Exzeitable mount are missing.

@alanvardy
Copy link
Owner

Resolved with #377

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
None yet
Development

No branches or pull requests

3 participants