primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.63k stars 1k forks source link

Dropdown: Why Filter Template was deprecated? #7116

Open franmc01 opened 2 weeks ago

franmc01 commented 2 weeks ago

Describe the bug

Before I used that because I needed to customize the search field with key filter and do some validations and implementation with the options that it returned to me like the reset and filter function? How could I do something like that now?

          filterTemplate={() => <InputText
              className="custom-input"
              hasIcon
              iconName="iu iu-icon-search"
              iconPosition="left"
              keyfilter={/^[a-zA-Z0-9ÁÉÍÓÚáéíóúñÑ\s]+$/}
              maxLength={40}
              parentClassName="dropdown-last-transactions-input-search"
              // placeholder={placeholder}
              // ref={filterInputRef}
              // value={filterValue}
              // onChange={(e) => myFilterFunction(e, filterOptions, 3)}
            />
          }
          showClear
        />

Reproducer

No response

System Information

X

Steps to reproduce the behavior

No response

Expected behavior

No response

franmc01 commented 2 weeks ago

I started to review the changeload and I didn't find the reason, but I do see that there is a commit where a refactor was made; but I don't understand the reason.

https://github.com/primefaces/primereact/commit/1918273ed95447ea53d8c176b7a700b97034af60#diff-21f01b4b318760218d253a6a798c35e5f9c10b997000314bc823e1089bfd8ab8

franmc01 commented 2 weeks ago

I thought it would be something cross but no, in multiselect and others it is still valid.