You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.2.6
Environment
vue 3.2.37, antdv 3.2.7(latest)
Reproduction link
Steps to reproduce
<a-typography-text
:editable="editableVar? {editing:false,}:false"
>
This is a typography...
</a-typography-text>
With the combinational adoption of boolean value and editing attribute of :editable, the editing state of typography cannot be forced to disable.
Change the value to editableVar===true
Click the edit icon of typography
Change the value back to editableVar===false
What is expected?
The editing mode of typography should not be activated.
What is actually happening?
The editing mode is activated at last.
I am trying to add a re-random icon to a typography. Since antdv does not provide fully customized API to add a brand new icon to a typography, I have to reuse the editable icon to build this function. The default behavior of editable icon should be prevented, that is, the click of editable icon should NOT ACTIVATE the editing mode of typography. It works good when the editing: false is set for editable. However, when editable is set to editable===false, editing: false can not be set to editable at the same time to prevent the editing mode. Meanwhile, it seems that typography has some extra internal states that is activated when the editable icon is clicked, and activate the editing mode when editable is set to editable === false.
This bug can be fixed by adding more conditional judgment, to prevent the editing mode to be accidentally activated when editable===false, or enhance the onStart API to provide a way to prevent the default behavior of editable icon, or adding fully customized API for customizing a brand new icon with independent interactive logic.
The text was updated successfully, but these errors were encountered:
Version
3.2.6
Environment
vue 3.2.37, antdv 3.2.7(latest)
Reproduction link
Steps to reproduce
With the combinational adoption of boolean value and
editing
attribute of:editable
, the editing state of typography cannot be forced to disable.editableVar===true
editableVar===false
What is expected?
The editing mode of typography should not be activated.
What is actually happening?
The editing mode is activated at last.
I am trying to add a
re-random
icon to a typography. Since antdv does not provide fully customized API to add a brand new icon to a typography, I have to reuse the editable icon to build this function. The default behavior of editable icon should be prevented, that is, the click of editable icon should NOT ACTIVATE the editing mode of typography. It works good when theediting: false
is set foreditable
. However, when editable is set toeditable===false
,editing: false
can not be set to editable at the same time to prevent the editing mode. Meanwhile, it seems that typography has some extra internal states that is activated when the editable icon is clicked, and activate the editing mode when editable is set toeditable === false
.This bug can be fixed by adding more conditional judgment, to prevent the editing mode to be accidentally activated when
editable===false
, or enhance theonStart
API to provide a way to prevent the default behavior of editable icon, or adding fully customized API for customizing a brand new icon with independent interactive logic.The text was updated successfully, but these errors were encountered: