Skip to content

Commit

Permalink
small patch to click to reveal
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed May 30, 2024
1 parent 4fe36e8 commit 90040fa
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions addon/components/click-to-reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,27 @@ export default class ClickToRevealComponent extends ClickToCopyComponent {
@tracked timeout = 600;

/**
* The loading state of the reveal process
* If click to copy should be enabled.
*
* @var {Boolean}
*/
@computed('args.clickToCopy') get clickToCopy() {
const { clickToCopy } = this.args;
@tracked clickToCopy = false;

return clickToCopy ?? false;
/**
* Setup the component
*
* @param {EngineInstance} owner
* @param {...Arguments} { column, clickToCopy, }
* @memberof ClickToRevealComponent
*/
constructor(owner, { column, clickToCopy }) {
super(...arguments);

this.clickToCopy = clickToCopy ?? false;

if (column && column.cellComponentArgs) {
this.clickToCopy = column.cellComponentArgs.clickToCopy ?? false;
}
}

/**
Expand Down

0 comments on commit 90040fa

Please sign in to comment.