diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-06 14:06:02 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-07-06 14:06:02 -0500 |
commit | f200719609743ffea8405d9ff159cf415ff0a833 (patch) | |
tree | 935fe5e96dfc9729829dad2e7cf532a8f7375233 /src/client/views/linking/LinkEditor.tsx | |
parent | 72fb84b1817c17667317c9e9aa6daea5ffc5acf5 (diff) |
implemented follow behavior options
Diffstat (limited to 'src/client/views/linking/LinkEditor.tsx')
-rw-r--r-- | src/client/views/linking/LinkEditor.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/linking/LinkEditor.tsx b/src/client/views/linking/LinkEditor.tsx index fbdfda5b3..3adf44339 100644 --- a/src/client/views/linking/LinkEditor.tsx +++ b/src/client/views/linking/LinkEditor.tsx @@ -288,7 +288,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { @observable description = StrCast(LinkManager.currentLink?.description); @observable openDropdown: boolean = false; - @observable currentFollow: string = "Default"; + @observable followBehavior = this.props.linkDoc.follow ? this.props.linkDoc.follow : "Default"; //@observable description = this.props.linkDoc.description ? StrCast(this.props.linkDoc.description) : "DESCRIPTION"; @@ -330,7 +330,8 @@ export class LinkEditor extends React.Component<LinkEditorProps> { @action changeFollowBehavior = (follow: string) => { this.openDropdown = false; - this.currentFollow = follow; + this.followBehavior = follow; + this.props.linkDoc.follow = follow; } @computed @@ -340,7 +341,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { Follow Behavior:</div> <div className="linkEditor-followingDropdown-dropdown"> <div className="linkEditor-followingDropdown-header"> - {this.currentFollow} + {this.followBehavior} <FontAwesomeIcon className="linkEditor-followingDropdown-icon" icon={this.openDropdown ? "chevron-up" : "chevron-down"} size={"sm"} onPointerDown={this.changeDropdown} /> @@ -348,7 +349,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { {this.openDropdown ? <div className="linkEditor-followingDropdown-optionsList"> <div className="linkEditor-followingDropdown-option" - onPointerDown={() => this.changeFollowBehavior("default")}> + onPointerDown={() => this.changeFollowBehavior("Default")}> Default </div> <div className="linkEditor-followingDropdown-option" |