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

Ability to get the same behavior as the hidden widget in a custom widget #1998

Open
papandreou opened this issue Jan 9, 2019 · 5 comments
Open
Labels

Comments

@papandreou
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I would like to create a version of my uuid widget that does not render a control or a preview, similar to the hidden widget. I need to use it in various nested settings where having a visible widget crowds up the screen too much.

However, it appears that the hidden widget achieves it hidden-ness by being special cased in various places:

... and a few more.

Describe the solution you'd like

That widgets can somehow opt into being hidden and receive the same treatment as the hidden widget.

(Although I guess that would mean that my hack to call onChange in componentDidMount wouldn't work, but hopefully we can find a way to avoid that :)

Describe alternatives you've considered

To just live with all those id fields being visible in my editor components.
Alternatively to use the hidden widget with a default function (suggested in #1407), but for my use case that's presently blocked by something like #1662 as default values for nested fields don't seem to work at all right now.

@tomrutgers
Copy link
Contributor

I think it would make a lot of sense to have a visible: false property as part of the widget configuration. And to have a uuid widget for that matter.

@Undistraction
Copy link
Contributor

Undistraction commented Jan 10, 2019

FWIW the approach I outline in #1975 would remove the need for a uuid widget completely, allowing the field to use a widget type of hidden, but I think decoupling the hiddenness from the type of widget makes a lot of sense.

@erquhart
Copy link
Contributor

erquhart commented Feb 1, 2019

This is covered in #1409.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@erquhart
Copy link
Contributor

erquhart commented Jan 3, 2020

#1409 is mostly largely implemented but still pending a few specific features. This issue will stay open to cover the addition of a visible config property for widgets, which will default to true and hide the widget in the UI when false, as the hidden widget currently does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants