fix(Gridler): 🐛 improve state management and cleanup
* Update `askAPIRowNumber` to return `null` or `number` for better type safety. * Refactor conditionals to ensure proper handling of row indices. * Clean up console logs for improved readability and performance. * Ensure consistent formatting across the codebase.
This commit is contained in:
@@ -61,7 +61,7 @@ export function GlidlerFormAdaptor(props: {
|
||||
col?: GridlerColumn,
|
||||
defaultItems?: MantineBetterMenuInstanceItem[]
|
||||
): MantineBetterMenuInstanceItem[] => {
|
||||
//console.log('GlidlerFormInterface getMenuItems', id);
|
||||
//console.log('GlidlerFormInterface getMenuItems', id, row, defaultItems);
|
||||
|
||||
if (id === 'header-menu') {
|
||||
return defaultItems || [];
|
||||
@@ -88,7 +88,7 @@ export function GlidlerFormAdaptor(props: {
|
||||
? props.descriptionField(row)
|
||||
: undefined;
|
||||
|
||||
if (id === 'other') {
|
||||
if (id === 'other' || (id === 'cell' && !row)) {
|
||||
items.push({
|
||||
c: 'blue',
|
||||
label: 'Add',
|
||||
|
||||
Reference in New Issue
Block a user