All things Shopify and commerce
Currently wanting this IndexFilter feature from Polaris but I'm not sure how to use it in javascript because it is documentated only on how to use in TypeScripts at the moment.
Current issue that I'm facing is how to convert this to javascript:
import type {IndexFiltersProps} from '@shopify/polaris'; const sortOptions: IndexFiltersProps['sortOptions'] = [ {label: 'Order', value: 'order asc', directionLabel: 'Ascending'}, {label: 'Order', value: 'order desc', directionLabel: 'Descending'}, {label: 'Customer', value: 'customer asc', directionLabel: 'A-Z'}, {label: 'Customer', value: 'customer desc', directionLabel: 'Z-A'}, {label: 'Date', value: 'date asc', directionLabel: 'A-Z'}, {label: 'Date', value: 'date desc', directionLabel: 'Z-A'}, {label: 'Total', value: 'total asc', directionLabel: 'Ascending'}, {label: 'Total', value: 'total desc', directionLabel: 'Descending'}, ];
can anyone knows how to use it in JSX?
Thanks in advance.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025