From 91488b681a81f3a7aaab561cbeca3a2f9dd61300 Mon Sep 17 00:00:00 2001 From: David <4661784+retyui@users.noreply.github.com> Date: Sat, 24 Sep 2022 11:30:48 +0200 Subject: [PATCH 1/2] Add ability to pass ItemSeparatorComponent as React Element Commit: https://github.com/facebook/react-native/commit/5854b11bf9d42bab9dbe62b9152a3d3a94e42c13 RN: 0.70.x + --- docs/flatlist.md | 8 ++++---- docs/sectionlist.md | 8 ++++---- docs/virtualizedlist.md | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/flatlist.md b/docs/flatlist.md index 0398e1181c3..9314678a537 100644 --- a/docs/flatlist.md +++ b/docs/flatlist.md @@ -245,11 +245,11 @@ For simplicity, data is a plain array. If you want to use something else, like a ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| --------- | -| component | +| Type | +| ---------------------------- | +| component, function, element | --- diff --git a/docs/sectionlist.md b/docs/sectionlist.md index 2469a8c3167..5b28b31c62d 100644 --- a/docs/sectionlist.md +++ b/docs/sectionlist.md @@ -248,11 +248,11 @@ Reverses the direction of scroll. Uses scale transforms of -1. ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Section]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Section]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| ------------------ | -| component, element | +| Type | +| ---------------------------- | +| component, function, element | --- diff --git a/docs/virtualizedlist.md b/docs/virtualizedlist.md index b1abd2c3ac0..e99c1cb6827 100644 --- a/docs/virtualizedlist.md +++ b/docs/virtualizedlist.md @@ -149,11 +149,11 @@ Each cell is rendered using this element. Can be a React Component Class, or a r ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| ------------------- | -| component, function | +| Type | +| ---------------------------- | +| component, function, element | --- From e602c2ca473c40413b77585c1502f22fcf00bb71 Mon Sep 17 00:00:00 2001 From: David <4661784+retyui@users.noreply.github.com> Date: Sun, 25 Sep 2022 11:27:59 +0200 Subject: [PATCH 2/2] edit the versioned files for 0.70 docs --- website/versioned_docs/version-0.70/flatlist.md | 8 ++++---- website/versioned_docs/version-0.70/sectionlist.md | 8 ++++---- website/versioned_docs/version-0.70/virtualizedlist.md | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/website/versioned_docs/version-0.70/flatlist.md b/website/versioned_docs/version-0.70/flatlist.md index 0398e1181c3..9314678a537 100644 --- a/website/versioned_docs/version-0.70/flatlist.md +++ b/website/versioned_docs/version-0.70/flatlist.md @@ -245,11 +245,11 @@ For simplicity, data is a plain array. If you want to use something else, like a ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| --------- | -| component | +| Type | +| ---------------------------- | +| component, function, element | --- diff --git a/website/versioned_docs/version-0.70/sectionlist.md b/website/versioned_docs/version-0.70/sectionlist.md index 2469a8c3167..5b28b31c62d 100644 --- a/website/versioned_docs/version-0.70/sectionlist.md +++ b/website/versioned_docs/version-0.70/sectionlist.md @@ -248,11 +248,11 @@ Reverses the direction of scroll. Uses scale transforms of -1. ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Section]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted`, `section`, and `[leading/trailing][Item/Section]` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| ------------------ | -| component, element | +| Type | +| ---------------------------- | +| component, function, element | --- diff --git a/website/versioned_docs/version-0.70/virtualizedlist.md b/website/versioned_docs/version-0.70/virtualizedlist.md index b1abd2c3ac0..e99c1cb6827 100644 --- a/website/versioned_docs/version-0.70/virtualizedlist.md +++ b/website/versioned_docs/version-0.70/virtualizedlist.md @@ -149,11 +149,11 @@ Each cell is rendered using this element. Can be a React Component Class, or a r ### `ItemSeparatorComponent` -Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. +Rendered in between each item, but not at the top or bottom. By default, `highlighted` and `leadingItem` props are provided. `renderItem` provides `separators.highlight`/`unhighlight` which will update the `highlighted` prop, but you can also add custom props with `separators.updateProps`. Can be a React Component (e.g. `SomeComponent`), or a React element (e.g. ``). -| Type | -| ------------------- | -| component, function | +| Type | +| ---------------------------- | +| component, function, element | ---