Merge pull request #12170 from ToolJet/fix/dropdown-clear-btn

Fix: In Dropdown, call "on select" event when user clicks on clear button
This commit is contained in:
Johnson Cherian 2025-03-10 12:08:42 +05:30 committed by GitHub
commit 88e54bcb46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -436,6 +436,7 @@ export const DropdownV2 = ({
onChange={(selectedOption, actionProps) => {
if (actionProps.action === 'clear') {
setInputValue(null);
fireEvent('onSelect');
}
if (actionProps.action === 'select-option') {
setInputValue(selectedOption.value);