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

Fix resizing of the item action column for dynamically added item actions #245

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

phyr97
Copy link
Collaborator

@phyr97 phyr97 commented May 7, 2024

If an item action is added dynamically after clicking another item action, for example, the column of the item actions is not resized, which results in an overflow of the icons. Now, the table listens for changes in its DOM tree and adjusts the width of the item action column based on the width of the element containing all the item action buttons.

@phyr97 phyr97 added the bug Something isn't working label May 7, 2024
@phyr97 phyr97 self-assigned this May 7, 2024
@pehbehbeh
Copy link
Member

@makl9797 What is the status of this PR? Please mark as draft if applicable. Please request a review when ready.

@phyr97 phyr97 marked this pull request as draft June 17, 2024 15:28
@@ -102,8 +113,8 @@
]}
>
<div
class="flex items-center justify-end space-x-2"
x-bind:style="`height: ${rowHeight - 1}px !important; width: ${actionsWidth - 32}px !important`"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makl9797 What is the status of this PR? Please mark as draft if applicable. Please request a review when ready.

I have removed the highlighted part so that the width of the column is auto. Previously the width was fixed, which meant that setActionsWidth did not work correctly either, as the width that is set in setActionsWidth is based on the previously set width. The problem now is that the column is no longer displayed correctly when the page is loaded due to the missing initial width setting. The correct width is calculated and set for a short time, but then immediately overwritten again. I have not yet been able to find out why this is the case, but the problem could be solved with a delay of half a second. However, this is not a reasonable solution to the problem. I have not worked on it any further so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants