Skip to content

Add initIn for scoped initialization/reinitialization and fix select reinit issues - #151

Open
correiarmjoao wants to merge 2 commits into
hunvreus:developmentfrom
correiarmjoao:development
Open

Add initIn for scoped initialization/reinitialization and fix select reinit issues#151
correiarmjoao wants to merge 2 commits into
hunvreus:developmentfrom
correiarmjoao:development

Conversation

@correiarmjoao

Copy link
Copy Markdown

Adds scoped initialization via initIn allowing for scoped reinitialization instead of full initialization with init/initAll.
It also fixes a couple of select reinit problems.

  • Reinitializing selects no longer crashes when redefining the public value property
  • Existing listeners are cleaned up before rebinding so repeated initAll() calls do not leave selects in a broken state

Checked manually:

  • normal auto-init still works
  • initIn() works on a scoped subtree
  • component-filtered init works
  • initAll() no longer breaks multiple selects
  • forced select reinit still keeps the public API working

@social5h3ll

Copy link
Copy Markdown

Duplicate of social5h3ll/basecoat#158 - same fix with additional select re-init improvements

@social5h3ll

Copy link
Copy Markdown

Duplicate of https://github.com/social5h3ll/basecoat/pull/158 - same fix plus select re-init improvements. Suggest closing this and reviewing #158 instead.

@traut

traut commented Jun 7, 2026

Copy link
Copy Markdown

it would be great to get this in @hunvreus

@hunvreus

hunvreus commented Jun 7, 2026

Copy link
Copy Markdown
Owner

I'm actually working on this right now for command, select and combobox.

@traut

traut commented Jun 22, 2026

Copy link
Copy Markdown

@hunvreus any idea on ETA? 🙇🏻‍♂️

@hunvreus

Copy link
Copy Markdown
Owner

I'm working on 1.0.0 (close to finished). New docs are here: https://basecoat.hunvreus.workers.dev/components/select/#javascript-api

I added a refresh() methods for some of the components (tabs, command, select, etc). Let me know if that solves your issue.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants