-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(book): edition by form, assistant in edition
This commit removes the `AiSuggestion` and `InlineEditBook` components, along with associated templates, reducing complexity in favor of simpler design. It introduces `getTagsString`/`setTagsString` and `getAuthorsString`/`setAuthorsString` methods in the `Book` entity for streamlined tag and author management. Additionally, minor adjustments include dependency updates (e.g., `league/commonmark`) and layout refinements such as modal alignment.
- Loading branch information
1 parent
517ca64
commit e6fa1e1
Showing
28 changed files
with
1,491 additions
and
867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Controller } from '@hotwired/stimulus'; | ||
import TomSelect from 'tom-select'; | ||
import { getComponent } from '@symfony/ux-live-component'; | ||
|
||
export default class extends Controller { | ||
async initialize() { | ||
this.component = await getComponent(this.element); | ||
|
||
window.addEventListener('select:clear', () => { | ||
console.log('clear'); | ||
this.reinitializeTomSelect(); | ||
}); | ||
} | ||
|
||
reinitializeTomSelect() { | ||
const selects = this.element.querySelectorAll('.tomselected'); | ||
selects.forEach(select => { | ||
if (select.tomselect) { | ||
const settings = select.tomselect.settings; | ||
console.log(settings); | ||
select.tomselect.sync() | ||
//select.tomselect.destroy(); | ||
//new TomSelect(select, settings); | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.