shopify/polaris react + rails 如何自定义 'more filters' 按钮和 sheet 行为?
shopify/polaris react + rails how to customize 'more filters' button and sheet behavior?
技术:
react-rails
gem v 2.4.7
- 反应 v 16.4.2
"@shopify/polaris": "4.2.1"
问题:
我使用北极星过滤器组件按照文档过滤了我的 table。我的过滤器和 table 与此处 'Filtering with a data table' 示例相似 https://polaris.shopify.com/components/lists-and-tables/filters#navigation, however I cannot get the 'More filters' text on the button that toggles the non-promoted filters sheet (https://polaris.shopify.com/components/overlays/sheet#navigation) 出现:
单击该按钮后出现的 sheet 还包括按钮上的两个没有任何描述性文本的按钮。右下角的按钮关闭 sheet 而左边的按钮什么都不做:
问题:
- 如何在按钮上包含 'More filters' 文本?
- 如何在 sheet 上显示的按钮上添加文本?
- 如何自定义 sheet 上按钮的操作?
- 假设,因为我不想要这个 - 我是否可以完全删除 'More filters' 按钮,因为我只有 3 个过滤器,它们都是有意设置为
shortcut: true
的?
添加import enTranslations from '@shopify/polaris/locales/en.json';
并包含为 AppProvider
属性:<AppProvider i18n={enTranslations}>
技术:
react-rails
gem v 2.4.7- 反应 v 16.4.2
"@shopify/polaris": "4.2.1"
问题:
我使用北极星过滤器组件按照文档过滤了我的 table。我的过滤器和 table 与此处 'Filtering with a data table' 示例相似 https://polaris.shopify.com/components/lists-and-tables/filters#navigation, however I cannot get the 'More filters' text on the button that toggles the non-promoted filters sheet (https://polaris.shopify.com/components/overlays/sheet#navigation) 出现:
单击该按钮后出现的 sheet 还包括按钮上的两个没有任何描述性文本的按钮。右下角的按钮关闭 sheet 而左边的按钮什么都不做:
问题:
- 如何在按钮上包含 'More filters' 文本?
- 如何在 sheet 上显示的按钮上添加文本?
- 如何自定义 sheet 上按钮的操作?
- 假设,因为我不想要这个 - 我是否可以完全删除 'More filters' 按钮,因为我只有 3 个过滤器,它们都是有意设置为
shortcut: true
的?
添加import enTranslations from '@shopify/polaris/locales/en.json';
并包含为 AppProvider
属性:<AppProvider i18n={enTranslations}>