Skip to content

Commit

Permalink
[release] 0.5.16 (#201)
Browse files Browse the repository at this point in the history
* [release] 0.5.15 (#193) (#194)

* Bump plist from 3.0.1 to 3.0.4

Bumps [plist](https://github.com/TooTallNate/node-plist) from 3.0.1 to 3.0.4.
- [Release notes](https://github.com/TooTallNate/node-plist/releases)
- [Changelog](https://github.com/TooTallNate/plist.js/blob/master/History.md)
- [Commits](https://github.com/TooTallNate/node-plist/commits)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: indirect
...



* Bump minimist from 1.2.5 to 1.2.6

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...



* Bump async from 2.6.2 to 2.6.4

Bumps [async](https://github.com/caolan/async) from 2.6.2 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.2...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...



* Bump simple-plist from 1.1.0 to 1.3.1

Bumps [simple-plist](https://github.com/wollardj/simple-plist) from 1.1.0 to 1.3.1.
- [Release notes](https://github.com/wollardj/simple-plist/releases)
- [Commits](wollardj/simple-plist@1.1.0...v1.3.1)

---
updated-dependencies:
- dependency-name: simple-plist
  dependency-type: indirect
...



* Bump moment from 2.25.3 to 2.29.4 (#174)

* Fix issue #178 (#179)

* Update RNCCheckbox.podspec (#183)

Fix pod issue

* update version

* Bump decode-uri-component from 0.2.0 to 0.2.2 (#186)

Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...




* Bump qs from 6.5.2 to 6.5.3 (#187)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...





* Bump ua-parser-js from 0.7.28 to 0.7.33 (#189)

Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.28 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](faisalman/ua-parser-js@0.7.28...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...





* Bump minimatch from 3.0.4 to 3.1.2 (#192)

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...





* fix(types): utility type removed from RN 0.71 (#190)



* update version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Punit Kumar <66327958+punitkashyup@users.noreply.github.com>
Co-authored-by: William Bell <williambell9708@outlook.com>
Co-authored-by: Minsik Kim <kmsbernard@gmail.com>

* bump windows min (#198)

* add setAndForwardRef to repo (#199)

* update version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Punit Kumar <66327958+punitkashyup@users.noreply.github.com>
Co-authored-by: William Bell <williambell9708@outlook.com>
Co-authored-by: Minsik Kim <kmsbernard@gmail.com>
Co-authored-by: Tatiana Kapos <tatianakapos@microsoft.com>
  • Loading branch information
6 people committed Jun 23, 2023
1 parent 5bea12a commit b8b2d13
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/js/CheckBox.android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
NativeSyntheticEvent,
} from 'react-native';
// @ts-ignore setAndForwardRef type does not exist in @types/react-native
import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef';
import setAndForwardRef from './setAndForwardRef';

import AndroidCheckBoxNativeComponent from './AndroidCheckBoxNativeComponent';

Expand Down
2 changes: 1 addition & 1 deletion src/js/CheckBox.ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from 'react-native';
import IOSCheckBoxNativeComponent from './IOSCheckBoxNativeComponent';
// @ts-ignore setAndForwardRef type does not exist in @types/react-native
import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef';
import setAndForwardRef from './setAndForwardRef';

type CheckBoxEvent = NativeSyntheticEvent<
Readonly<{
Expand Down
2 changes: 1 addition & 1 deletion src/js/CheckBox.windows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from 'react-native';
import WindowsCheckBoxNativeComponent from './WindowsCheckBoxComponent';
// @ts-ignore setAndForwardRef type does not exist in @types/react-native
import setAndForwardRef from 'react-native/Libraries/Utilities/setAndForwardRef';
import setAndForwardRef from './setAndForwardRef';

type CheckBoxEvent = NativeSyntheticEvent<
Readonly<{
Expand Down
63 changes: 63 additions & 0 deletions src/js/setAndForwardRef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Imported from RN .71
*/

import type {ElementRef} from 'react';

type Args = {
getForwardedRef: () => React.Ref<any> | undefined;
setLocalRef: (ref: ElementRef<any>) => any;
};

/**
* This is a helper function for when a component needs to be able to forward a ref
* to a child component, but still needs to have access to that component as part of
* its implementation.
*
* Its main use case is in wrappers for native components.
*
* Usage:
*
* class MyView extends React.Component {
* _nativeRef = null;
*
* _setNativeRef = setAndForwardRef({
* getForwardedRef: () => this.props.forwardedRef,
* setLocalRef: ref => {
* this._nativeRef = ref;
* },
* });
*
* render() {
* return <View ref={this._setNativeRef} />;
* }
* }
*
* const MyViewWithRef = React.forwardRef((props, ref) => (
* <MyView {...props} forwardedRef={ref} />
* ));
*
* module.exports = MyViewWithRef;
*/

function setAndForwardRef({
getForwardedRef,
setLocalRef,
}: Args): (ref: ElementRef<any>) => void {
return function forwardRef(ref: ElementRef<any>) {
let forwardedRef = getForwardedRef();

setLocalRef(ref);

// Forward to user ref prop (if one has been specified)
if (typeof forwardedRef === 'function') {
// Handle function-based refs. String-based refs are handled as functions.
forwardedRef(ref);
} else if (typeof forwardedRef === 'object' && forwardedRef != null) {
// Handle createRef-based refs
forwardedRef = ref;
}
};
}

export default setAndForwardRef;
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-community/checkbox",
"version": "0.5.15",
"version": "0.5.16",
"description": "React Native Checkbox native modules for Android , iOS and Windows",
"keywords": [
"checkbox",
Expand Down
2 changes: 1 addition & 1 deletion src/windows/CheckboxWindows/CheckboxWindows.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="ReactNativeWindowsProps">
Expand Down

0 comments on commit b8b2d13

Please sign in to comment.