Blog sorting menu displays wrong option
Closed this issue · 0 comments
flybot-nam-nguyenhoai commented
Problem
On the blog page, regardless of the user's chosen sorting option, the menu always shows the default ("Date created (newest first)").
This is probably caused by the value
property of the select
menu.
Suggestion
Replace the value
property with defaultValue
.
This is specific to React. Both value
and defaultValue
are valid, but in different situations—value
should be used for "controlled" select boxes, while defaultValue
should be used for "uncontrolled" select boxes.1