Keira3 icon indicating copy to clipboard operation
Keira3 copied to clipboard

Creature -> Text: Selection does not update edit fields

Open sudlud opened this issue 1 year ago • 6 comments

tested on Keira 3.7.1

Open Keira3 -> Creature -> e.g. ID 29 -> open Creature -> Text

click on first text line -> UI edit fields update for this line

now click on any other text line -> UI edit fields do not update for the selected line -> UI edit fields will always show the entries for the first selected line

sudlud avatar Sep 23 '24 12:09 sudlud

Can confirm the issue above to correct that the value display above is always the first value in the list and not the first one selected.

Update: Correct me if wrong as I don't know the structure of Keira, but type script seems easier to understand.

https://github.com/azerothcore/Keira3/blob/e08b1963dd621e102db9159fe6268393a1f57b4b/libs/shared/acore-world-model/src/entities/creature-text.type.ts#L9

Should this value always default to "0" or should update depending what GroupID which is clicked? (in the row)

TheSCREWEDSoftware avatar Sep 26 '24 21:09 TheSCREWEDSoftware

that is just to define the type, which is an int so 0 and not a string like "0", moreover running

DESCRIBE acore_world.creature_text;

I see that the default value is 0 in the SQL table, so it should be correct.

Thanks for asking ;-)

By the way, I can also confirm the bug, hope to find a solution

Helias avatar Sep 26 '24 23:09 Helias

Could you tell me within the code of keira where the function that searches for that ID is?

TheSCREWEDSoftware avatar Sep 26 '24 23:09 TheSCREWEDSoftware

it's in multi-row-editor.service.ts, it takes in the constructor the field value from creature-text.service.ts

Helias avatar Sep 26 '24 23:09 Helias

I strongly think that I missed to add some logic here https://github.com/azerothcore/Keira3/pull/3038 I will check it in the next days

Helias avatar Sep 26 '24 23:09 Helias

In Gossip => Select Gossip Menu => TexID 1651

I was trying to see where this logic in the constructor is, because here it works as intended (just has 1 value)

TheSCREWEDSoftware avatar Sep 26 '24 23:09 TheSCREWEDSoftware

checking it better, you're right @TheSCREWEDSoftware, but we have to implement on keira3 a way to manage a third Primary Key in a table (and maybe even more if necessary) Right now with https://github.com/azerothcore/Keira3/pull/3102 the issue reported is fixed but we need to manage when a user use same GroupID in multiple rows with different IDs

EDIT: I wrote a separate issue for this https://github.com/azerothcore/Keira3/issues/3103

Helias avatar Oct 26 '24 23:10 Helias