Replies: 2 comments 1 reply
-
I tried to simplify drastically to see if maybe it was something silly I was doing, and sadly I'm still having the same issues when taking the following approach instead of a plugin. cellProperties: ({ model }: { model: any }) => {
return {
onClick: (e: any) => {
const accordion = document.querySelector('.accordion-content');
if (accordion) {
accordion.remove();
}
// Create Content
const accordionContent = document.createElement('div');
accordionContent.className = 'accordion-content';
accordionContent.innerHTML = '<div>Extra Details to view</div>'
e.target.append(accordionContent);
}
};
}, |
Beta Was this translation helpful? Give feedback.
-
Hi @AndrewR3K this will not work if element you are looking for is inside of given cell (and you know for sure it's there) you need to check for it, in your case logic is: Correct approach would be to make it on data level, you need to provide data source expanded and collapsed based on it. I believe RevoGrid Pro has a plugin for such case called Tree Data View Also you can get similar function with grouping, so you would have to prepare your data in a such way that grouped rows will have prop from parent |
Beta Was this translation helpful? Give feedback.
-
Hi! First off, I just want to say that I love RevoGrid so far and hope to continue to use it. So wonderful job devs!
Now into what I am trying to solve.
Goal
I want to be able to click on a cell and have an accordion style drop down with extra information bellow the row itself.
The Issue
The issue I am running into, is when appending the HTML content, for some reason it appends it to multiple elements (usually at a seemingly consistent distance from one another, and requires scrolling to see), even though when logging out the class dom it only shows 1 instance. I assume this might have something to do with the virtual scrolling, but im honestly at a complete loss here.
Example:
What I have done so far
I have created a custom plugin to handle this functionality that I am trying to achieve. But I am running into some errors that I have no clue how to resolve at the moment and would love some advice/feedback from the community.
Thank you all in advance!
Tech Stack
Nuxt 3
Plugin Code
Columns code
Beta Was this translation helpful? Give feedback.
All reactions