Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

allow targets to be dynamically added and removed to the DOM #19

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

bellenss
Copy link

@bellenss bellenss commented Jul 3, 2022

This is a request to extend use of the the Stimulus lifecycle callbacks, to make the controller function properly when checkbox checkboxAll targets are dynamically added and/or removed from the DOM.
Use cases is dynamically updating list content with Turbo streams in Rails.

@guillaumebriday guillaumebriday self-assigned this Dec 23, 2022
@guillaumebriday guillaumebriday self-requested a review December 23, 2022 21:29
@guillaumebriday
Copy link
Member

That's nice, thanks @bellenss

@guillaumebriday guillaumebriday merged commit f3f0e21 into stimulus-components:master Dec 23, 2022
@guillaumebriday
Copy link
Member

We can also remove the connect and disconnect method for the controller with this PR 👍

I will do it in another PR

@guillaumebriday
Copy link
Member

Released in https://github.com/stimulus-components/stimulus-checkbox-select-all/releases/tag/v5.2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants