Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TenantNavigation): fix radio button value #969

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

artemmufazalov
Copy link
Member

Closes #965

@artemmufazalov artemmufazalov requested a review from Raubzeug July 2, 2024 14:23
return (
<div className={b()}>
<RadioButton
width="auto"
onUpdate={handleUpdate}
size="l"
className={b('body')}
defaultValue={getCurrentItem().id}
value={tenantPage}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that it will be enough just change property from defaultValue to value.
Lets stick to this and return all tabs calculations to useTenantNavigation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, why we need to set current property to items and get current item with getCurrentItem, if we could just use tenantPage. For me it just adds complexity

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to alter only value, to have all calculations separately from visualization

@artemmufazalov artemmufazalov changed the title fix(TenantNavigation): use tab value from state fix(TenantNavigation): fix radio button value Jul 2, 2024
@artemmufazalov artemmufazalov merged commit 7d85393 into main Jul 2, 2024
4 checks passed
@artemmufazalov artemmufazalov deleted the 965-fix-tenant-tab branch July 2, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tenant selected tab isn't changed by actions
2 participants