Openbravo Issue Tracking System - POS2
View Issue Details
0049944POS2POSpublic2022-08-04 11:082022-08-12 09:20
plujan 
meriem_azaf 
normalminorhave not tried
closedfixed 
5
 
22Q4 
No
0049944: [ProductSearch] Removing a filter using Backspace does not completely removes the filter
When using a text for filtering, it works fine if I select the whole text and delete it, but if I delete the characters one by one the last one is shown after deleted
1. From the main pos window, go to the "Search" field to filter the keymap
2. Enter three characters "GPS" (case is not relevant)
3. Select all the text and delete it. As expected, the filter is cleared out and the keymap is not filtered anymore.
4. Enter again "GPS"
5. Use the Backspace key to remove the S, the P and finally the G. Notice that the G shows up after deleted and the filtering is not cleared out as the keymap only shows the products containing the letter G
FASH
related to defect 0049958 new Retail [Product Search] Present schema is not taken into account and all products are mixed 
jpg ProductFiltering.jpg (68,918) 2022-08-04 11:08
https://issues.openbravo.com/file_download.php?file_id=17370&type=bug
jpg

? BackspaceAndClearDoNotWorkProperly.mp4 (3,139,123) 2022-08-04 12:52
https://issues.openbravo.com/file_download.php?file_id=17382&type=bug
Issue History
2022-08-04 11:08plujanNew Issue
2022-08-04 11:08plujanAssigned To => Retail
2022-08-04 11:08plujanFile Added: ProductFiltering.jpg
2022-08-04 11:08plujanTriggers an Emergency Pack => No
2022-08-04 12:52lorenzofidalgoFile Added: BackspaceAndClearDoNotWorkProperly.mp4
2022-08-04 12:55lorenzofidalgoNote Added: 0139899
2022-08-05 16:01rafarodaTag Attached: FASH
2022-08-05 16:03rafarodaRelationship addedrelated to 0049958
2022-08-09 09:41hgbotNote Added: 0139995
2022-08-10 09:24AugustoMauchAssigned ToRetail => meriem_azaf
2022-08-10 09:24AugustoMauchStatusnew => scheduled
2022-08-12 09:20hgbotResolutionopen => fixed
2022-08-12 09:20hgbotStatusscheduled => closed
2022-08-12 09:20hgbotNote Added: 0140082
2022-08-12 09:20hgbotFixed in Version => 22Q4
2022-08-12 09:20hgbotNote Added: 0140083

Notes
(0139899)
lorenzofidalgo   
2022-08-04 12:55   
A similar behaviour can also be reproduced with the following Steps:
0-Login POS2 as vallblanca.
1-Inside the Product Search input field, write "bott". A filtering will be executed after 1 second.
2-Using the backspace, delete last character and just after that, click "X" button to clear all the input field content. DEFECT: The clear will be executed, but, after just a moment all the string except for 1 character will appear again. These two actions must be done quickly to be able to reproduce it (check attached file BackspaceAndClearDoNotWorkProperly.mp4).
(0139995)
hgbot   
2022-08-09 09:41   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1132 [^]
(0140082)
hgbot   
2022-08-12 09:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1132 [^]
(0140083)
hgbot   
2022-08-12 09:20   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 9aa9f2c0deca35e96bab92e9386b012a029748aa
Author: Meriem Azaf <meriem.azaf@openbravo.com>
Date: 12-08-2022 09:20:15
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/9aa9f2c0deca35e96bab92e9386b012a029748aa [^]

Fixes ISSUE-49944: Removing a filter using Backspace does not completely removes the filter.

When using a text for filtering, it works fine if I select the whole text and delete it, but if I delete the characters one by one the last one is shown after deleted.

To fix this, we had add debounceHandleSearch.cancel() in the onFilterChange in SearchInput.jsx.

---
M web-jspack/org.openbravo.pos2/src/components/ProductSearch/SearchInput/SearchInput.jsx
M web-jspack/org.openbravo.pos2/src/components/ProductSearch/SearchInput/__test__/SearchInput.test.jsx
---