primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Dropdown: Why Filter Template was deprecated?

Open franmc01 opened this issue 1 year ago • 2 comments

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 avatar Sep 04 '24 15:09 franmc01

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 avatar Sep 04 '24 16:09 franmc01

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

franmc01 avatar Sep 04 '24 16:09 franmc01

any alternative here?

sergiomendi avatar Jun 26 '25 06:06 sergiomendi