Skip to content

Commit

Permalink
Fix primefaces#3081: maintain p-filled properly
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed Jul 20, 2022
1 parent 0c140d3 commit b46485b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/lib/inputtext/InputText.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const InputText = React.memo(React.forwardRef((props, ref) => {

const isFilled = React.useMemo(() => (
ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue) || (elementRef.current && ObjectUtils.isNotEmpty(elementRef.current.value))
), [props.value, props.defaultValue]);
), [props.value, props.defaultValue, elementRef.current?.value]);

React.useEffect(() => {
ObjectUtils.combinedRefs(elementRef, ref);
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputtextarea/InputTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const InputTextarea = React.memo(React.forwardRef((props, ref) => {

const isFilled = React.useMemo(() => (
ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue) || (elementRef.current && ObjectUtils.isNotEmpty(elementRef.current.value))
), [props.value, props.defaultValue]);
), [props.value, props.defaultValue, elementRef.current?.value]);

React.useEffect(() => {
ObjectUtils.combinedRefs(elementRef, ref);
Expand Down
2 changes: 1 addition & 1 deletion components/lib/mention/Mention.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export const Mention = React.memo(React.forwardRef((props, ref) => {

const isFilled = React.useMemo(() => (
ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue) || (inputRef.current && ObjectUtils.isNotEmpty(inputRef.current.value))
), [props.value, props.defaultValue, inputRef]);
), [props.value, props.defaultValue, inputRef.current?.value]);

React.useImperativeHandle(ref, () => ({
show,
Expand Down
2 changes: 1 addition & 1 deletion components/lib/password/Password.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Password = React.memo(React.forwardRef((props, ref) => {

const isFilled = React.useMemo(() => (
ObjectUtils.isNotEmpty(props.value) || ObjectUtils.isNotEmpty(props.defaultValue) || (inputRef.current && ObjectUtils.isNotEmpty(inputRef.current.value))
), [props.value, props.defaultValue, inputRef]);
), [props.value, props.defaultValue, inputRef.current?.value]);

const updateLabels = () => {
if (meterState) {
Expand Down

0 comments on commit b46485b

Please sign in to comment.