-
Notifications
You must be signed in to change notification settings - Fork 17
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
TNO-1848: State bug with home filters #1157
Conversation
@@ -29,7 +29,7 @@ export const ActionSection: React.FC<IActionSectionProps> = ({ values }) => { | |||
<Row gap="0.5rem" alignItems="center" justifyContent="center"> | |||
<ContentActions | |||
init | |||
filter={(a) => a.id !== +alertId && a.contentTypes.includes(values.contentType)} | |||
filter={(a) => a.id !== +alertId && a.contentTypes?.includes(values.contentType)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing an error for me on the editor side when creating a new snippet
const getClassName = (type: HomeFilterType) => (type === active ? 'active' : 'inactive'); | ||
|
||
useEffect(() => { | ||
switch (filter.contentTypes[0]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this array ever be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually addressing this right now for another ticket (adding the all option) going to push to this branch with updates when complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, additional small ticket added to this PR as well.
setActive(HomeFilterType.RadioTV); | ||
break; | ||
case ContentTypeName.Story: | ||
console.log(filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
Cleanup the component, and fix state errors so the filter is persisted when navigating back to the list view.
Added ALL toggle: