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

Only create sortable when not disabled #20565

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

silamon
Copy link
Contributor

@silamon silamon commented Apr 20, 2024

Proposed change

Sortable is only created when disabled is explicitly false unless you come back to the page and it connects again. This adds the disabled check in the connectedCallback as well.

To reproduce in demo:

  1. Open the section page (https://demo.home-assistant.io/#/lovelace)
  2. Switch to Energy
  3. Switch back to section page

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link
Member

@piitaya piitaya left a comment

Choose a reason for hiding this comment

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

Thank you @silamon !

@piitaya piitaya merged commit f39758b into home-assistant:dev Apr 20, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cards in sections are drag-droppable when not in Edit Dashboard mode
2 participants