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

New Component: Inplace #970

Closed
cagataycivici opened this issue Sep 27, 2016 · 9 comments
Closed

New Component: Inplace #970

cagataycivici opened this issue Sep 27, 2016 · 9 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@cagataycivici
Copy link
Member

Inspired by PrimeFaces inplace;

http://www.primefaces.org/showcase/ui/input/inplace.xhtml

@bakasmarius
Copy link

bakasmarius commented Feb 3, 2017

Is it possible to close (deactivate) p-inplace using code only and avoiding the close button?
for example:

          <p-inplace closable="closable" id="pInplace">
              <span pInplaceDisplay>Some text</span>
              <span pInplaceContent>
                <p-autoComplete
                  (onSelect)="pInplace.close();">
                </p-autoComplete>                      
              </span>
          </p-inplace>

What could I actually call in onSelect for p-inplace to actually deactivate?

@MohammedFCIS
Copy link

@bakasmarius, Hello did you manage to do that? thank you

@bakasmarius
Copy link

Hi @MohammedFCIS, no - I ended up not using this component at all.

@cagataycivici cagataycivici self-assigned this Mar 1, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Mar 1, 2017
@cagataycivici cagataycivici added this to the 2.0.2 milestone Mar 1, 2017
@cagataycivici
Copy link
Member Author

We'll add collapsed property so you can bind to it also add a public method.

@cagataycivici
Copy link
Member Author

cagataycivici commented Mar 1, 2017

Just realized we have a property already named active;

<p-inplace closable="closable" [style]="{'min-height':'30px'}" [active]="active">
        <span pInplaceDisplay>
            Click to Edit
        </span>
        <span pInplaceContent>
            <input type="text" value="PrimeNG" pInputText>
        </span>
    </p-inplace>
    
    <button (click)="active=!active">Toggle</button>

@cagataycivici cagataycivici removed this from the 2.0.2 milestone Mar 1, 2017
@MohammedFCIS
Copy link

Thank you @bakasmarius for reply, hoping the best for you

@sgentile
Copy link

sgentile commented Dec 8, 2017

My understanding is a control that switches from label to text should return back to label onblur vs. staying open and requiring the user to select an 'x' ?

@sgentile
Copy link

sgentile commented Dec 8, 2017

I have to click the toggle button twice in the example above for it to work for me

@chriskali
Copy link

chriskali commented Jul 20, 2018

@sgentile
Same behavior on me. Did you solved it?

@mertsincan mertsincan added this to the 2.0.2 milestone Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

6 participants