polaris icon indicating copy to clipboard operation
polaris copied to clipboard

[IndexTable] allow ReactNode as heading title

Open sylvhama opened this issue 2 years ago • 1 comments

Feature request summary

  • update typing to allow ReactNode instead of string for title in IndexTableHeading;
  • fix React keys issues when passing a node;

Rationale

Right now it's already possible to pass a component to title and it will render correctly: https://codesandbox.io/s/tooltips-examples-75cc9c?file=/App.js

But TypeScript will complain, plus React will throw warnings about React keys in the console.

sylvhama avatar Sep 07 '22 16:09 sylvhama

I have made a PR: https://github.com/Shopify/polaris/pull/7122

sylvhama avatar Sep 07 '22 16:09 sylvhama