|
|
@ -65,15 +65,12 @@ class ManageCategories extends React.Component {
|
|
|
|
"Category Removed Successfully!",
|
|
|
|
"Category Removed Successfully!",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("g");
|
|
|
|
|
|
|
|
const {categories} = this.state;
|
|
|
|
const {categories} = this.state;
|
|
|
|
const remainingElements = categories.filter(function (value) {
|
|
|
|
const remainingElements = categories.filter(function (value) {
|
|
|
|
return value.categoryName !== id;
|
|
|
|
return value.categoryName !== id;
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
categories: remainingElements
|
|
|
|
categories: remainingElements
|
|
|
|