Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow initial mode to be set #100

Open
durmuse opened this issue Jan 28, 2024 · 1 comment
Open

Allow initial mode to be set #100

durmuse opened this issue Jan 28, 2024 · 1 comment

Comments

@durmuse
Copy link

durmuse commented Jan 28, 2024

I'm submitting a

Feature request

Current behavior

It looks like viewMode is always the default option and it is not possible to start with edit mode initially.

Expected behavior

Allow initial mode to be programmatically set (either being view or edit mode).

Minimal reproduction of the problem with instructions

No response

What is the motivation / use case for changing the behavior?

No response

Environment

No response

@sumirolabs
Copy link

I've figured out a workaround using ViewChild to get the instance of the EditableComponent and call editMode.set(true) .

import { xxx, ViewChild, AfterViewInit } from '@angular/core';

export class XXX... {
  @ViewChild(EditableComponent) editableComponent!: EditableComponent;

  ngAfterViewInit() {
    this.editableComponent.editMode.set(true);
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants