const[dataValue, setDataValue] = useState([]);
const filter = () => {
let datafil = filterdataArray; // Array Filter Data Here
+ let val = datafil.sort(function (a, b) {
+ let dateA = a.name.toLowerCase();
+ let dateB = b.name.toLowerCase();
+ if (dateA < dateB) {
+ return -1;
+ } else if (dateA > dateB) {
+ return 1;
+ }
+ return 0;
+ });
+ setDataValue(val);
}