zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
39 stars 5 forks source link

Content: One to One and One to Many Field: Do Not Show Items that are Not Saved or Published in the dropdown options #2487

Closed zcolah closed 6 months ago

zcolah commented 7 months ago

Describe the bug Currently an item that has only been locally created and is not saved or published is appearing as an option in the one to one and one to many field dropdowns. This leads to a user being able to select it and create an item with it.

Solution This should not happen. Instead an item should only appear in the dropdown if it is:

See Loom for full explanation. https://www.loom.com/share/bf7ce4fb5c9d435083243b19d9d8bbcf

Note: @gtllien has confirmed that this issue is replicable and is a bug:

Looks like a bug to me - items should not appear in the dropdown selection unless it's already created/saved

jomarmontuya commented 7 months ago

@zcolah @agalin920

Hello both just wanted to confirm if this behavior is intented. that we save the content item in the itemList even it was not created in the first place?

https://github.com/zesty-io/manager-ui/assets/61284357/a69eb036-37a5-4e87-a7ec-49b35214313d

if that was intented maybe we should just exclude this items with tag new-{itemzuid} from the dropdown list? to avoid showing up

Image

zcolah commented 7 months ago

@jomarmontuya good question, I think @agalin920 can give more context on what the right approach is

agalin920 commented 7 months ago

@jomarmontuya

" if that was intented maybe we should just exclude this items with tag new-{itemzuid} from the dropdown list? to avoid showing up "

Is a valid approach as this is clear that the item has not been generated in the system and is only in local memory