question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add prop(s) to hide popconfirm actions

See original GitHub issue

This function solves the problem (这个功能解决的问题)

More consistency between Popconfirms and Popovers

Expected API (期望的 API)

<template>
  <n-popover>
    <template #trigger>
      <n-button> Hover </n-button>
    </template>
    <!-- NOTE because popovers can have a header, perhaps there should be a separate header icon slot -->
    <template #header-icon>
        <n-icon><!-- selected icon --></n-icon>
    </template>
    <template #icon>
        <n-icon><!-- selected icon --></n-icon>
    </template>
  <!-- popover text -->
  </n-popover>
</template>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
07akionicommented, Aug 4, 2021

It seems like popconfirm and popover could be combined into one component

Actually they are nearly the same, popconfirm just wrap popover with some extra DOM.

It’s possible to make it like

<n-popover>
  <template #trigger>xxx</template>
  <n-popconfirm-content>
    yyy
  </n-popconfirm-content>
</n-popover>

However I won’t do that. It won’t make user’s DX better but add a lot of work in library development.

0reactions
07akionicommented, Aug 4, 2021

I think we may provide a way to hide popconfirm’s action.

This would help a lot! Should I change the title of this issue to “Add prop(s) to hide popconfirm actions”?

Just a thought, not a request: If a popconfirm’s actions can be hidden, doesn’t this mean that a popconfirm can be made to behave exactly like a popover by setting trigger="hover"? It seems like popconfirm and popover could be combined into one component 🤔

Yes I think you can do it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add prop(s) to hide popconfirm actions · Issue #770 - GitHub
This function solves the problem (这个功能解决的问题) More consistency between Popconfirms and Popovers Expected API (期望的 API) Hover.
Read more >
Popconfirm - Ant Design
A simple and compact confirmation dialog of an action.
Read more >
How to add popconfirm from antd design to file removal action
I want to show PopConfirm each time the user is trying to remove uploaded file. But the problem is: PopConfirm require React Element...
Read more >
antd Popconfirm TypeScript Examples - ProgramCreek.com
The following examples show how to use antd.Popconfirm. You can vote up the ones you like or vote down the ones you don't...
Read more >
ReactJS UI Ant Design Popconfirm Component - GeeksforGeeks
Popconfirm is a simple and compact confirmation dialog of an action. It is basically used to ask for user confirmation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found