Skip to content

Support Direct Element Attributes Updates #1236

Closed

Description

@jkusa

Subject of the issue

Currently, after initial render, direct element attribute updates are not kept in sync with the internal gridstack state.

Your environment

n/a

Steps to reproduce

  1. Create grid with an item with a width of 2
  2. Update the width attribute to 5 via element attribute (data-gs-width=5)
  3. Manually reposition/drag item
  4. Item will then resize back to a with of 2

Expected behaviour

Item options can be updated via element attributes

Actual behaviour

Item options updated via element attributes do not work/stick

Activity

  1. adumesny commented on Nov 28, 2020

    @adumesny
    Member

    I fixed GridStack.update() to take all options (more work than I expected) but not sure how I should track external DOM changes to update internal state... is that something you still need and can suggest code ?

  2. adumesny commented on Dec 3, 2020

    @adumesny
    Member

    closing unless I hear back with code as I don't have bandwidth. thanks

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions