Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.

Home Page:https://livewire-powergrid.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request for Custom Placeholder Text in Laravel Livewire Power Grid Number Filter

moxesh-easternts opened this issue · comments

⚡ PowerGrid ⚡ Feature Request

Summary

I'm requesting the ability to set custom placeholder text for the min and max input boxes in the Laravel Livewire PowerGrid's number filter.

Why is this needed?

Currently, when using multiple instances of Filter::number, it can be confusing for users to see "Min" and "Max" placeholders repeated. This confusion can be alleviated by allowing developers to specify custom placeholder text for each instance of the number filter.

Suggested Solution(s)

I suggest enhancing the PowerGrid component to support custom placeholder text for each Filter::number instance. However, it appears that there might be an issue with the chaining of methods for setting the placeholder text, as demonstrated in the following code:

Filter::number('earn_point', 'earn_point')
    ->thousands(',')
    ->placeholder('Minimum Earning Point', 'Maximum Earning Point'),

Related issue(s)/PR(s)

This request is not related to any existing issue or pull request.

commented

Hi @moxesh-easternts,

Thank you for submitting the feature request.

The ->placeholder() method already exists, but it is not working. I will be submitting a PR soon.

I am closing this issue in favor of the bug report issue.