Skip to content

Filter result count ? #1113

Closed Answered by lrljoe
dgillier asked this question in Q&A
Mar 21, 2023 · 8 comments · 12 replies
Discussion options

You must be logged in to vote

Yeah, that won't work I'm afraid! You'll need to pass it in via Alpine.

There are a few steps here:
1) Set up an Alpine variable
Do this in the componentWrapper (so that it is available to all of the child elements). This will hold the rowCount!

       $this->setComponentWrapperAttributes([
          "x-data" => "{ rowCount : 0 }"
      ]);

2) Set two custom views
First blade - "rowCountUpdateView" must be in before-pagination OR after-pagination areas, this is used solely for setting the Alpine variable to the correct value! I'd recommend using the before-pagination area!

Second blade - "YourOtherCustomView" Wherever you'd like to display the value!

$this->setConfigurableAreas([ 
       …

Replies: 8 comments 12 replies

Comment options

lrljoe
Mar 22, 2023
Collaborator Sponsor

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Mar 26, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
2 replies
@lrljoe
Comment options

lrljoe Mar 30, 2023
Collaborator Sponsor

@lrljoe
Comment options

lrljoe Mar 31, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Mar 31, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Mar 31, 2023
Collaborator Sponsor

Answer selected by dgillier
Comment options

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
1 reply
@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

Comment options

You must be logged in to vote
4 replies
@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

@dgillier
Comment options

@lrljoe
Comment options

lrljoe Apr 3, 2023
Collaborator Sponsor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants