Skip to content

Commit

Permalink
hotfix on content panel component
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Apr 2, 2024
1 parent 6ac2d92 commit 700a229
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions addon/components/content-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ export default class ContentPanelComponent extends Component {
*/
@tracked toggleOnCaretOnly = false;

/**
* Determines if the dropdown button should render in place.
*
* @property {boolean} dropdownButtonRenderInPlace - Whether the dropdown button should render in place..
* @default false
* @public
*/
@tracked dropdownButtonRenderInPlace = false;

/**
* Array of icon containers used for checking if the user clicked on or within a caret.
*
Expand All @@ -42,14 +51,15 @@ export default class ContentPanelComponent extends Component {
* @constructor
* @public
*/
constructor() {
constructor(owner, { open = false, toggleOnCaretOnly = false, dropdownButtonRenderInPlace = true, onInsert }) {
super(...arguments);

this.isOpen = this.args.open === true;
this.toggleOnCaretOnly = this.args.toggleOnCaretOnly === true;
this.isOpen = open === true;
this.toggleOnCaretOnly = toggleOnCaretOnly === true;
this.dropdownButtonRenderInPlace = dropdownButtonRenderInPlace === true;

if (typeof this.args.onInsert === 'function') {
this.args.onInsert(...arguments);
if (typeof onInsert === 'function') {
onInsert(...arguments);
}
}

Expand Down

0 comments on commit 700a229

Please sign in to comment.