diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df58360..1b90d05 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [18] + node-version: [20] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/js/SegmentedControl.js b/js/SegmentedControl.js index 903f278..9e24486 100644 --- a/js/SegmentedControl.js +++ b/js/SegmentedControl.js @@ -84,7 +84,7 @@ const SegmentedControl = ({ if (ref.current) { ref.current.measure((_x, _y, width) => updateSegmentWidth(width)); } - }, [values]); + }, [values, updateSegmentWidth]); return ( + testID={testID} + accessible={true} + accessibilityLabel={Platform.select({ + android: testID, + ios: typeof value === 'string' ? value : testID, + })}> {typeof value === 'number' || typeof value === 'object' ? ( diff --git a/package.json b/package.json index 6aa7dd5..1252c56 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-segmented-control/segmented-control", - "version": "2.5.5", + "version": "2.5.6", "description": "React Native SegmentedControlIOS library", "main": "js/index.js", "types": "index.d.ts",