Skip to content

Commit

Permalink
chore(InputMasked): remove cleaned_value prop (#1907)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored and tujoworker committed Feb 3, 2023
1 parent c7af13e commit 85b46eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ showTabs: true
| `on_change` | _(optional)_ will be called on value changes made by the user. Returns an object with the value as a string and the native event: `{ value, numberValue, cleanedValue, event }`. |
| [Input](/uilib/components/input/events) | _(optional)_ all `Input` events are supported. |

**NB:** `numberValue` is returned as a float value and is only returned if the createNumberMask is used by either using `number_mask`, `currency_mask`, `as_number` or `as_currency`. The `cleanedValue` is deprecated.
**NB:** `numberValue` is returned as a float value and is only returned if the createNumberMask is used by either using `number_mask`, `currency_mask`, `as_number` or `as_currency`.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ const useCallEvent = ({ setLocalValue }) => {

// We may have to check against a negative value: && 1 / +0 === 1 / numberValue
const cleanedValue = numberValue === 0 ? '' : num
const cleaned_value = cleanedValue // Deprecated

if (name === 'on_change' && numberValue === 0) {
correctCaretPosition(event.target, maskParams)
Expand All @@ -434,7 +433,6 @@ const useCallEvent = ({ setLocalValue }) => {
value,
numberValue,
cleanedValue,
cleaned_value, // Deprecated
})

if (name === 'on_change') {
Expand Down

0 comments on commit 85b46eb

Please sign in to comment.