Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: renrizzolo/react-native-sectioned-multi-select
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 74e4f0f07bfa895e3c5051d9a1c471e15e0b0254
Choose a base ref
..
head repository: renrizzolo/react-native-sectioned-multi-select
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9282952147defdf3befa6d0ebe260bb99b86c225
Choose a head ref
Showing with 67 additions and 51 deletions.
  1. +8 −0 CHANGELOG.md
  2. +8 −3 lib/components/RowItem.js
  3. +2 −0 lib/components/RowSubItem.js
  4. +2 −1 lib/sectioned-multi-select.js
  5. +1 −1 package-lock.json
  6. +46 −46 package.json
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.10.0 - 2023-05-11

### Fixed

- Add Various Accessibility Properties #290
- adds rolls and accessibility states for selected state, expanded state
- readme fixes #275, #287

## 0.9.1 - 2022-01-09

### Fixed
11 changes: 8 additions & 3 deletions lib/components/RowItem.js
Original file line number Diff line number Diff line change
@@ -216,6 +216,8 @@ class RowItem extends Component {
subItemsFlatListProps
} = this.props
const hasDropDown = item[subKey] && item[subKey].length > 0 && showDropDowns
const itemSelected = this._itemSelected(item)
const showSubCategoryDropDown = this._showSubCategoryDropDown()

return (
<View>
@@ -230,6 +232,8 @@ class RowItem extends Component {
<TouchableOpacity
disabled={(readOnlyHeadings && !showDropDowns) || item.disabled}
onPress={this._dropDownOrToggle}
accessibilityState={{ selected: itemSelected }}
accessibilityRole={readOnlyHeadings ? 'header' : 'menuitem'}
style={[
{
flex: 1,
@@ -239,7 +243,7 @@ class RowItem extends Component {
paddingVertical: 6
},
mergedStyles.item,
this._itemSelected(item) && mergedStyles.selectedItem
itemSelected && mergedStyles.selectedItem
]}
>
{selectedIconOnLeft && this._renderSelectedIcon()}
@@ -280,9 +284,10 @@ class RowItem extends Component {
},
mergedStyles.toggleIcon
]}
accessibilityState={{ expanded: showSubCategoryDropDown }}
onPress={this._toggleDropDown}
>
{this._showSubCategoryDropDown() ? (
{showSubCategoryDropDown ? (
<View>
{callIfFunction(dropDownToggleIconUpComponent) || (
<Icon
@@ -308,7 +313,7 @@ class RowItem extends Component {
</TouchableOpacity>
)}
</View>
{item[subKey] && this._showSubCategoryDropDown() && (
{item[subKey] && showSubCategoryDropDown && (
<FlatList
keyExtractor={(i) => `${i[uniqueKey]}`}
data={item[subKey]}
2 changes: 2 additions & 0 deletions lib/components/RowSubItem.js
Original file line number Diff line number Diff line change
@@ -131,6 +131,8 @@ class RowSubItem extends Component {
<TouchableOpacity
disabled={highlightChild || subItem.disabled}
onPress={this._toggleItem}
accessibilityState={{ selected: itemSelected }}
accessibilityRole="menuitem"
style={[
{
flex: 1,
3 changes: 2 additions & 1 deletion lib/sectioned-multi-select.js
Original file line number Diff line number Diff line change
@@ -1292,7 +1292,8 @@ class SectionedMultiSelect extends PureComponent {
<TouchableWithoutFeedback
onPress={this._toggleSelector}
disabled={this.state.selector || disabled}
>
accessibilityRole="combobox"
>
<View
style={[
{
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 46 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"name": "react-native-sectioned-multi-select",
"version": "0.9.1",
"description": "a multi (or single) select component with support for sub categories, search, chips.",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"lint": "eslint ./lib/**/*.{js,jsx} --fix",
"format": "prettier ./lib/**/*.{js,jsx} --write && npm run lint --fix",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"lodash.isequal": "^4.5.0",
"memoize-one": "^6.0.0"
},
"devDependencies": {
"@react-native-community/eslint-config": "^3.0.1",
"eslint": "^7.32.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-react-native-a11y": "^3.0.0",
"prettier": "^2.5.1"
},
"peerDependencies": {
"prop-types": "^15.6.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/renrizzolo/react-native-sectioned-multi-select.git"
},
"keywords": [
"select",
"multiselect",
"picker",
"category",
"react",
"native"
],
"author": "Ren Rizzolo",
"license": "MIT",
"bugs": {
"url": "https://github.com/renrizzolo/react-native-sectioned-multi-select/issues"
},
"homepage": "https://github.com/renrizzolo/react-native-sectioned-multi-select#readme"
}
{
"name": "react-native-sectioned-multi-select",
"version": "0.10.0",
"description": "a multi (or single) select component with support for sub categories, search, chips.",
"main": "index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"lint": "eslint ./lib/**/*.{js,jsx} --fix",
"format": "prettier ./lib/**/*.{js,jsx} --write && npm run lint --fix",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"lodash.isequal": "^4.5.0",
"memoize-one": "^6.0.0"
},
"devDependencies": {
"@react-native-community/eslint-config": "^3.0.1",
"eslint": "^7.32.0",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-react-native-a11y": "^3.0.0",
"prettier": "^2.5.1"
},
"peerDependencies": {
"prop-types": "^15.6.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/renrizzolo/react-native-sectioned-multi-select.git"
},
"keywords": [
"select",
"multiselect",
"picker",
"category",
"react",
"native"
],
"author": "Ren Rizzolo",
"license": "MIT",
"bugs": {
"url": "https://github.com/renrizzolo/react-native-sectioned-multi-select/issues"
},
"homepage": "https://github.com/renrizzolo/react-native-sectioned-multi-select#readme"
}