From 7cf5af9a8b53296b1a40f02270089a2c8fdc1e80 Mon Sep 17 00:00:00 2001 From: Zane Spalding <88853042+r-zane-spalding@users.noreply.github.com> Date: Tue, 8 Mar 2022 12:32:13 -0500 Subject: [PATCH] fix: add type definition for `disablePoppingOnBackspace` prop (#554) * Adding disablePoppingOnBackspace prop/implementing * Adding test for disablePoppingOnBackspace * Updating snapshot index.test.js.md * Updating snapshot index.test.js.md * Updating docs with disablePoppingOnBackspaceProp * Removing snapshot * Adding snapshot back * Removing redundant assertion * Fix: adding missing disablePoppingOnBackspace prop Co-authored-by: Hrusikesh Panda --- types/react-dropdown-tree-select.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-dropdown-tree-select.d.ts b/types/react-dropdown-tree-select.d.ts index 55f9239f..b9e4f2b8 100644 --- a/types/react-dropdown-tree-select.d.ts +++ b/types/react-dropdown-tree-select.d.ts @@ -99,6 +99,10 @@ declare module 'react-dropdown-tree-select' { searchPredicate?: (currentNode: TreeNode, searchTerm: string) => boolean /** inlineSearchInput=true Makes the search input renders inside the dropdown-content. Defaults to `false` */ inlineSearchInput?: boolean + /** disablePoppingOnBackspace=true indicates that when a user triggers a 'backspace' keyDown in the empty + * search bar, the tree will not deselect nodes. + */ + disablePoppingOnBackspace?: boolean } export interface DropdownTreeSelectState {