diff --git a/components/doc/dropdown/filterdoc.js b/components/doc/dropdown/filterdoc.js index e310013f82..8711ddee9f 100644 --- a/components/doc/dropdown/filterdoc.js +++ b/components/doc/dropdown/filterdoc.js @@ -165,6 +165,7 @@ export default function FilterDemo() { optionLabel="name" placeholder="Select a Country" filter + showClear valueTemplate={selectedCountryTemplate} itemTemplate={countryOptionTemplate} className="w-full md:w-14rem" diff --git a/components/lib/dropdown/Dropdown.js b/components/lib/dropdown/Dropdown.js index 75e87941eb..bb42a54dcb 100644 --- a/components/lib/dropdown/Dropdown.js +++ b/components/lib/dropdown/Dropdown.js @@ -458,6 +458,10 @@ export const Dropdown = React.memo( }); } + if (props.filter) { + resetFilter(); + } + updateEditableLabel(); };