Openbravo Issue Tracking System - POS2
View Issue Details
0047158POS2Corepublic2021-06-16 12:082021-06-30 11:50
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
No
0047158: Clear text button should be clicked twice to clear form inputs
Clear text button should be clicked twice to clear form inputs
1. Log in pos2
2. Open Customers window
3. Click on New Customer
4. Type any value in the name field
5. Press the "x" button of the field to clear it. ERROR: Note that it is not cleared
6- Press the "x" button again. Now the field is cleared.
No tags attached.
related to defect 0046975 closed platform Field value in form is not correctly deleted when clearing with 'X' button 
Issue History
2021-06-16 12:08caristuNew Issue
2021-06-16 12:08caristuAssigned To => caristu
2021-06-16 12:08caristuTriggers an Emergency Pack => No
2021-06-16 12:11hgbotNote Added: 0129555
2021-06-16 16:42jarmendarizRelationship addedrelated to 0047104
2021-06-16 16:43jarmendarizRelationship addedrelated to 0046975
2021-06-16 16:43jarmendarizRelationship deletedrelated to 0047104
2021-06-16 18:38dmiguelezResolution time => 1626213600
2021-06-16 18:38dmiguelezStatusnew => acknowledged
2021-06-30 11:50hgbotNote Added: 0130004
2021-06-30 11:50hgbotResolutionopen => fixed
2021-06-30 11:50hgbotStatusacknowledged => closed
2021-06-30 11:50hgbotNote Added: 0130005

Notes
(0129555)
hgbot   
2021-06-16 12:11   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/564 [^]
(0130004)
hgbot   
2021-06-30 11:50   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/564 [^]
(0130005)
hgbot   
2021-06-30 11:50   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: 3f9df4d9fcdc1a1494c48be103db56bacf890003
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 2021-06-30T09:46:58+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/3f9df4d9fcdc1a1494c48be103db56bacf890003 [^]

fixes ISSUE-47158: clear text not working properly in form inputs

  Now the form inputs are cleared properly after pressing their clear
text button. To fix this, when the button is pressed we include a new
property named "type" in the onChange event to identify this flow. This
is necessary as in this case we want to force the processing of the
field value.

  Together with some improvements have been added:

  - Force the field cleared with the clear text button to acquire the
focus.
  - Now the "on change" feature of the form handler is fired even if
the field validation fails.
  - The debounced dispatch is immediately fired when the "on change"
execution finishes.
  - Centralize the logic of the clear input button used by
BaseFormInput, BaseFormDatePicker and BaseFormTimePicker components.

---
A web-jspack/org.openbravo.core2/src/components/BaseFormInput/ClearInputButton.jsx
A web-jspack/org.openbravo.core2/src/components/BaseFormInput/ClearInputButton.scss
A web-jspack/org.openbravo.core2/src/components/BaseFormInput/__test__/clearInput.js
M web-jspack/org.openbravo.core2/src/components/BaseFormDatePicker/BaseFormDatePicker.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/BaseFormInput.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/BaseFormInput.scss
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/__test__/BaseFormInput.test.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormInput/stories/BaseFormInput.stories.jsx
M web-jspack/org.openbravo.core2/src/components/BaseFormTimePicker/BaseFormTimePicker.jsx
M web-jspack/org.openbravo.core2/src/components/Form/BaseForm.jsx
M web-jspack/org.openbravo.core2/src/components/Form/__test__/ConfigurableForm.test.jsx
M web-jspack/org.openbravo.core2/src/components/Form/__test__/TestForm.config.json
---