-
Notifications
You must be signed in to change notification settings - Fork 33
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
B2B-2150 fix types and simplify getFilterMoreList within ShippingLists #249
Conversation
…last in ShippingLists
…o hooks in ShippingLists
…tStatus in ShippingLists
…tus in ShippingLists
…atus in ShippingLists
…istStatus in ShippingLists
…Status in ShippingLists
…t in ShippingLists
…ithin ShoppingLists
4b9a6c8
to
5187a95
Compare
@@ -54,6 +54,7 @@ function ShoppingLists() { | |||
const [deleteOpen, setDeleteOpen] = useState<boolean>(false); | |||
const [deleteItem, setDeleteItem] = useState<null | ShoppingListsItemsProps>(null); | |||
const [filterMoreInfo, setFilterMoreInfo] = useState<Array<any>>([]); | |||
const getFilterMoreList = useGetFilterMoreList(); |
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.
🤔 do we want to push this to useData
as well?
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.
right now it's full of building blocks for visual concerns, rather than data we'd expect from I/O:
{
name: 'createdBy',
required: false,
default: '',
fieldType: 'dropdown',
options: newCreatedByUsers,
replaceOptions: { label: 'createdBy', value: 'createdBy' },
xs: 12,
variant: 'filled',
size: 'small',
label: b3Lang('global.shoppingLists.filter.createdBy'),
}
my hope is that we can instead move these values out and closer to JSX that requires them, eventually making this hook redundant 🤞
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.
fair point
Jira: B2B-2150
N.B. - this might be easy enough to read as one change, rather than 1 commit at a time
What/Why?
getFilterMoreList
created a list of filters that was transformed within the viewgetFilterMoreList
(now the return function of a hook)B3Filter
to workout if or notgetFilterMoreList
's interface can be further simplifiedRollout/Rollback
Testing