Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: vue2 insert column disable? #10881

Open
zhongguodong opened this issue Mar 28, 2024 · 5 comments
Open

[Bug]: vue2 insert column disable? #10881

zhongguodong opened this issue Mar 28, 2024 · 5 comments

Comments

@zhongguodong
Copy link

Describe the bug

Why is insert column left disabled when I right-click a menu option in Array of objects mode?

Video/Screenshots

image

Provide a link to the demo with the bug reproduction

No response

Handsontable version

14.2

Framework version

No response

Your environment

Chrome,Windows 10

@AMBudnik
Copy link
Contributor

Hi @zhongguodong

When you are using an object-based dataset or/and columns options the column addition is disabled. That option in the menu uses the alter() method underneath.

Zrzut ekranu 2024-03-29 o 08 56 37

To allow users to add a new column, you would need to create you own custom demo option. Here https://handsontable.com/docs/react-data-grid/context-menu/#context-menu-with-a-fully-custom-configuration you can find an example of a custom context menu.

@zhongguodong
Copy link
Author

zhongguodong commented Mar 29, 2024

@AMBudnik With an Array of objects, adding columns is prohibited. It needs to be implemented with custom menus and alter methods, is that what you mean?

@AMBudnik
Copy link
Contributor

Yes, that is correct @zhongguodong . Within your custom menu you would need to create an option that is altering the dataset with a new column.

@zhongguodong
Copy link
Author

@AMBudnik Array of arrays mode, the menu inside the addition of columns can be. How does this work?

@AMBudnik
Copy link
Contributor

If the dataset is an array of arrays you do not need to create a custom menu - the alter() method will allow you to remove/add columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants