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

Shape returned from url: /pimcore-studio/api/tags/${queryArg.elementType}/${queryArg.id} #639

Open
xIrusux opened this issue Dec 11, 2024 · 0 comments

Comments

@xIrusux
Copy link

xIrusux commented Dec 11, 2024

Image

As you can see the Api call returns an Array of Tags. The same is the case in "children".

The console log on the right returns a data.items structure as below.
It would be great if this could be adjusted.

{
"8": {
"id": 8,
"parentId": 7,
"hasChildren": false,
"path": "/Countries/United Kingdom",
"text": "United Kingdom",
"children": [],
"iconName": "tag-02",
"additionalAttributes": []
}
}

Here another example:

{
"8": {
"id": 8,
"parentId": 7,
"hasChildren": false,
"path": "/Countries/United Kingdom",
"text": "United Kingdom",
"children": [],
"iconName": "tag-02",
"additionalAttributes": []
},
"15": {
"id": 15,
"parentId": 0,
"hasChildren": true,
"path": "/Color",
"text": "Color",
"children": [
{
"id": 21,
"parentId": 15,
"hasChildren": false,
"path": "/Color/mint",
"text": "mint",
"children": [],
"iconName": "tag-02",
"additionalAttributes": []
},
{
"id": 22,
"parentId": 15,
"hasChildren": false,
"path": "/Color/red",
"text": "red",
"children": [],
"iconName": "tag-02",
"additionalAttributes": []
}
],
"iconName": "tag-02",
"additionalAttributes": []
}
}

I have also noticed that each property of a Tag is optional but I am assuming we always hold at least an id and text?

Image

Please feel free to get in touch to have a conversation if that helps.

@xIrusux xIrusux transferred this issue from pimcore/studio-ui-bundle Dec 11, 2024
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

1 participant