Skip to content

Commit

Permalink
reverted multiselect dropdown changes (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov authored Jul 30, 2024
1 parent 56a14d4 commit 85734bc
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion react/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "webpack --mode production"
},
"dependencies": {
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"@egovernments/digit-ui-components": "0.0.2-beta.19",
"@egovernments/digit-ui-libraries": "1.8.2-beta.1",
"@egovernments/digit-ui-module-common": "1.7.10",
"@egovernments/digit-ui-module-core": "1.8.1-beta.6",
Expand Down
2 changes: 1 addition & 1 deletion react/modules/Project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.1-beta.4",
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"@egovernments/digit-ui-components": "0.0.2-beta.19",
"lodash": "^4.17.21",
"react": "17.0.2",
"react-date-range": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion react/modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"prepublish": "yarn build"
},
"dependencies": {
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"@egovernments/digit-ui-components": "0.0.2-beta.19",
"@egovernments/digit-ui-react-components": "1.8.1-beta.4",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion react/modules/sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.1-beta.4",
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"@egovernments/digit-ui-components": "0.0.2-beta.19",
"react": "17.0.2",
"react-date-range": "^1.4.0",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@egovernments/digit-ui-module-sample": "0.0.1",
"@egovernments/digit-ui-react-components": "1.7.10",
"@egovernments/digit-ui-svg-components": "1.0.4",
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"@egovernments/digit-ui-components": "0.0.2-beta.19",
"babel-loader": "8.1.0",
"clean-webpack-plugin": "4.0.0",
"css-loader": "5.2.6",
Expand Down
2 changes: 1 addition & 1 deletion react/ui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-components",
"version": "0.0.2-beta.18",
"version": "0.0.2-beta.19",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
22 changes: 11 additions & 11 deletions react/ui-components/src/atoms/MultiSelectDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ const MultiSelectDropdown = ({
function reducer(state, action) {
switch (action.type) {
case "ADD_TO_SELECTED_EVENT_QUEUE":
// return [
// ...state,
// { code: action.payload?.[1]?.code, propsData: action.payload },
// ];
const updatedState = [...state, { code: action.payload?.[1]?.code, propsData: action.payload }];
onSelect(
updatedState.map((e) => e.propsData),
getCategorySelectAllState(),
props
);
return updatedState;
return [
...state,
{ code: action.payload?.[1]?.code, propsData: action.payload },
];
// const updatedState = [...state, { code: action.payload?.[1]?.code, propsData: action.payload }];
// onSelect(
// updatedState.map((e) => e.propsData),
// getCategorySelectAllState(),
// props
// );
// return updatedState;
case "REMOVE_FROM_SELECTED_EVENT_QUEUE":
const newState = state.filter(
(e) => e?.code !== action.payload?.[1]?.code
Expand Down

0 comments on commit 85734bc

Please sign in to comment.