Skip to content

Commit

Permalink
Fix primefaces#4291: InputNumber respect PrimeReact.locale
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 12, 2023
1 parent e1fed2f commit 33b9b16
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import PrimeReact from '../api/Api';
import { PrimeReactContext } from '../api/context';
import { useMountEffect, useUpdateEffect } from '../hooks/Hooks';
import { AngleDownIcon } from '../icons/angledown';
import { AngleUpIcon } from '../icons/angleup';
Expand All @@ -8,7 +8,6 @@ import { Ripple } from '../ripple/Ripple';
import { Tooltip } from '../tooltip/Tooltip';
import { DomHandler, IconUtils, ObjectUtils, classNames, mergeProps } from '../utils/Utils';
import { InputNumberBase } from './InputNumberBase';
import { PrimeReactContext } from '../api/context';

export const InputNumber = React.memo(
React.forwardRef((inProps, ref) => {
Expand Down Expand Up @@ -40,7 +39,7 @@ export const InputNumber = React.memo(
const _prefix = React.useRef(null);
const _index = React.useRef(null);

const _locale = props.locale || PrimeReact.locale;
const _locale = props.locale || context.locale;
const stacked = props.showButtons && props.buttonLayout === 'stacked';
const horizontal = props.showButtons && props.buttonLayout === 'horizontal';
const vertical = props.showButtons && props.buttonLayout === 'vertical';
Expand Down

0 comments on commit 33b9b16

Please sign in to comment.