Skip to content

Commit 34fcad4

Browse files
committed
chore(web): explain by comments
1 parent 9b0a724 commit 34fcad4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/web/src/components/search/SearchBox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,6 +1427,8 @@ const SearchBox = (props) => {
14271427
{...getInputProps({
14281428
className: getClassName(props.innerClass, 'input'),
14291429
placeholder: props.placeholder,
1430+
// When props.value is defined,
1431+
// it means SearchBox is used as a controlled component
14301432
value: Object.hasOwn(props, 'value') ? props.value : currentValue || '',
14311433
onChange: onInputChange,
14321434
onBlur: withTriggerQuery(props.onBlur),

0 commit comments

Comments
 (0)