vite changes; table edit fix
This commit is contained in:
@@ -42,8 +42,9 @@ export function DataTableComponent({
|
|||||||
const handleEditRow: MRT_TableOptions<any>['onEditingRowSave'] = async ({
|
const handleEditRow: MRT_TableOptions<any>['onEditingRowSave'] = async ({
|
||||||
values,
|
values,
|
||||||
table,
|
table,
|
||||||
|
row,
|
||||||
}) => {
|
}) => {
|
||||||
editRow({ method: 'PATCH', endpoint: endpoint, body: values });
|
editRow({ method: 'PATCH', endpoint: endpoint, body: { ...values, id:row.id }});
|
||||||
table.setEditingRow(null);
|
table.setEditingRow(null);
|
||||||
};
|
};
|
||||||
const openDeleteConfirmModal = (row: MRT_Row<any>) =>
|
const openDeleteConfirmModal = (row: MRT_Row<any>) =>
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ function Header({
|
|||||||
{greet
|
{greet
|
||||||
.replace('$firstName', currentUser.firstName)
|
.replace('$firstName', currentUser.firstName)
|
||||||
.replace('$lastName', currentUser.lastName)
|
.replace('$lastName', currentUser.lastName)
|
||||||
.replace('$firstName^', currentUser.firstName.toUpperCase())
|
.replace('$^firstName', currentUser.firstName.toUpperCase())
|
||||||
.replace('$lastName^', currentUser.lastName.toUpperCase())}
|
.replace('$^lastName', currentUser.lastName.toUpperCase())}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Stack
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: `http://localhost:5000/${env.VITE_BASE_URL}`,
|
target: `${env.VITE_DOMAIN_DEV}/${env.VITE_BASE_URL}`,
|
||||||
changeOrigin: false,
|
changeOrigin: false,
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
@@ -23,7 +23,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
proxy: {
|
proxy: {
|
||||||
api: {
|
api: {
|
||||||
target: 'http://localhost:5000',
|
target: `${env.VITE_DOMAIN_DEV}`,
|
||||||
changeOrigin: false,
|
changeOrigin: false,
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user