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

Data attributes doesn't get updated in DOM after changing #1275

Closed
carloslancha opened this issue Oct 30, 2018 · 0 comments
Closed

Data attributes doesn't get updated in DOM after changing #1275

carloslancha opened this issue Oct 30, 2018 · 0 comments
Assignees
Labels
status: next-release Issues that will enter into the next release

Comments

@carloslancha
Copy link
Contributor

carloslancha commented Oct 30, 2018

Using, for example, a ClayButton:

var button = new ClayButton({
   data: {
      title: 'My Button Title',
   },
   label: 'My Button',
});

The result is:

<button class="btn btn-primary" type="button" data-title="My Button Title">My Button</button>

if you change the button data the DOM element it's not getting updated with new data:

button.data.title = 'My New Title';

Expected result:
<button class="btn btn-primary" type="button" data-title="My New Title">My Button</button>

Current result:
<button class="btn btn-primary" type="button" data-title="My Button Title">My Button</button>

@carloslancha carloslancha self-assigned this Oct 30, 2018
julien added a commit that referenced this issue Oct 31, 2018
Fixes #1275 - Sync data attributes in ClayComponent
@matuzalemsteles matuzalemsteles added the status: next-release Issues that will enter into the next release label Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: next-release Issues that will enter into the next release
Projects
None yet
Development

No branches or pull requests

2 participants