System Information
- Strapi Version: 4.11.4
- Operating System: windows 10
- Database: MySql
- Node Version: 18.20.2
- NPM Version: 10.5.0
- Yarn Version: -
Hello everyone, I need to know if it is possible to modify the order of these fields by pressing a button.
this is my plugin
import * as React from "react";
import { useIntl } from "react-intl";
import { Button } from "@strapi/design-system";
import { useDispatch, useSelector } from "react-redux";
import reorderRequests from "./../../api/reorder";
const ReorderButton = React.forwardRef((props, ref) => {
const { onChange, value, name, attribute, intlLabel } = props;
const dispatch = useDispatch();
const { admin_app } = useSelector((state) => {
console.log("state", state);
return state;
});
const handleReorderClick = () => {
const componentsDataStructure = {};
const contentTypeDataStructure = {};
dispatch({
type: "ContentManager/CrudReducer/SET_DATA_STRUCTURES",
componentsDataStructure,
contentTypeDataStructure,
});
};
return (
<Button variant="default" onClick={handleReorderClick}>
Reordenar
</Button>
);
});
export default ReorderButton;
