feat: enhance TableManagementPage and ExcelUploadModal for improved functionality
- Added handling for unique and nullable column toggles in TableManagementPage, allowing for better column configuration. - Updated ExcelUploadModal to include depth and ancestors in valid options for category values, enhancing the categorization process. - Improved user feedback in ExcelUploadModal by clarifying success messages and ensuring proper handling of duplicate actions. - Refactored category value flattening logic to maintain depth and ancestor information, improving data structure for better usability. These enhancements aim to provide users with a more flexible and intuitive experience when managing table configurations and uploading Excel data.
This commit is contained in:
@@ -1586,6 +1586,20 @@ export default function TableManagementPage() {
|
||||
selectedColumn={selectedColumn}
|
||||
onSelectColumn={setSelectedColumn}
|
||||
onColumnChange={(columnName, field, value) => {
|
||||
if (field === "isUnique") {
|
||||
const currentColumn = columns.find((c) => c.columnName === columnName);
|
||||
if (currentColumn) {
|
||||
handleUniqueToggle(columnName, currentColumn.isUnique || "NO");
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (field === "isNullable") {
|
||||
const currentColumn = columns.find((c) => c.columnName === columnName);
|
||||
if (currentColumn) {
|
||||
handleNullableToggle(columnName, currentColumn.isNullable || "YES");
|
||||
}
|
||||
return;
|
||||
}
|
||||
const idx = columns.findIndex((c) => c.columnName === columnName);
|
||||
if (idx >= 0) handleColumnChange(idx, field, value);
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user