Skip to content

Commit

Permalink
Merge pull request #989 from AI4Bharat/minorfix01
Browse files Browse the repository at this point in the history
minor fix for long dataset items page getting blank
  • Loading branch information
ishvindersethi22 authored Apr 1, 2024
2 parents 7fb24a7 + ab1bec2 commit 236df42
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui/pages/component/common/DataitemsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,15 @@ const DataitemsTable = () => {
const [searchAnchor, setSearchAnchor] = useState(null);
const searchOpen = Boolean(searchAnchor);
const [searchedCol, setSearchedCol] = useState();
localStorage.setItem("DataitemsList", JSON.stringify(columns));
localStorage.setItem("Dataitem", JSON.stringify(dataitemsList));

useEffect(()=>{
try{
localStorage.setItem("DataitemsList", JSON.stringify(columns));
localStorage.setItem("Dataitem", JSON.stringify(dataitemsList));
}catch{
console.log("Local storage set item quota exceeded")
}
}, [columns, dataitemsList]);

const getDataitems = () => {
const dataObj = new GetDataitemsById(
Expand Down

0 comments on commit 236df42

Please sign in to comment.