Skip to content

Commit

Permalink
fix: amend advance search tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil20 committed Nov 27, 2024
1 parent 4da60be commit 2cf5a35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/client/src/views/SearchResult/AdvancedSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ const DeathSection = () => {
const AdvancedSearch = () => {
const intl = useIntl()
const { hasBirthSearchScopes, hasDeathSearchScopes } = usePermissions()
const activeTabId = hasBirthSearchScopes() ? TabId.BIRTH : TabId.DEATH
const [activeTabId, setActiveTabId] = useState(
hasBirthSearchScopes() ? TabId.BIRTH : TabId.DEATH
)
const dispatch = useDispatch()
const tabSections: IFormTabs<TabId>[] = [
{
Expand Down Expand Up @@ -513,6 +515,7 @@ const AdvancedSearch = () => {
sections={tabSections}
activeTabId={activeTabId}
onTabClick={(id: TabId) => {
setActiveTabId(id)
dispatch(
setAdvancedSearchParam({
...advancedSearchInitialState,
Expand Down

0 comments on commit 2cf5a35

Please sign in to comment.