Skip to content

Conversation

@nst37
Copy link
Contributor

@nst37 nst37 commented Dec 17, 2025

No description provided.

Copy link
Contributor

@woodseowl woodseowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to run this locally and got JS errors on the search box. Is it working for you on your local?

Copy link
Collaborator

@inaydich inaydich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I downloaded the code, but the search is not working for me: nothing happens

</button>
</div>
</flux:field>

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use our csd components here (label, input, button)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to use csd components. Check it out again

public function sort($column) {

if ($this->sortBy === $column) {
if ($this->sortBy === $column) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it an extra space added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was misaligned.

Copy link
Collaborator

@inaydich inaydich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good and works. Could you try to replace the flux components with our CSD components?

@nst37
Copy link
Contributor Author

nst37 commented Dec 19, 2025

It looks good and works. Could you try to replace the flux components with our CSD components?

Yep, just replaced it.

@nst37 nst37 requested review from inaydich and woodseowl December 19, 2025 19:45
Copy link
Contributor

@woodseowl woodseowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                        <x-cds.input
                            label="Filter by name"
                            placeholder="Search users..."
                            class="w-full"
                            wire:model.live="nameFilter"
                            clearable
                        />

I'd love to see the filter be done this way. It takes advantage of Livewire and Flux, removing the needs for all of these things:

  • reset button (with "clearable"),
  • 'filterByName()' and 'resetFilter()' functions (because of "model.live")
  • form and the submit button (because of "model.live")
  • and flux:field is redunant

I think the only thing we'd need to address is an appropriate aria-live=polite attribute.

Maybe we could have this after this filter:

            <div aria-live="polite" class="sr-only">
                @if ($this->users->total() > 0)
                    <div>Showing {{ $this->users->firstItem() }} to {{ $this->users->lastItem() }} of {{ $this->users->total() }} results
                    </div>
                @else
                    <div>No results found</div>
                @endif
            </div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants