Skip to content

Conversation

@johanrd
Copy link
Contributor

@johanrd johanrd commented Jan 28, 2026

Summary

  • Add thunk overload to preferences config option
  • When preferences is a thunk, sync from adapter on each modify() cycle
  • Enables reactive preference sharing between multiple tables

Usage

// Tables using thunks react to shared adapter changes                                                                                                                                                                                                                                                
headlessTable(this, {                                                                                                                                                                                                                                                                                 
  preferences: () => ({                                                                                                                                                                                                                                                                               
    key: "shared-table-preferences",                                                                                                                                                                                                                                                                                  
    adapter: this.args.sharedPreferencesAdapter,                                                                                                                                                                                                                                                            
  }),                                                                                                                                                                                                                                                                                                 
  // ...                                                                                                                                                                                                                                                                                              
});                                                                                                                                                                                                                                                                                                  

Test plan

  • Added test for multi-table reactive sync
  • All 186 existing tests pass

@NullVoxPopuli NullVoxPopuli added the enhancement New feature or request label Jan 28, 2026
@NullVoxPopuli NullVoxPopuli merged commit b1a1341 into universal-ember:main Jan 28, 2026
13 of 14 checks passed
@github-actions github-actions bot mentioned this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants