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

x-props partially working #281

Open
mttmccb opened this issue Jul 26, 2021 · 7 comments
Open

x-props partially working #281

mttmccb opened this issue Jul 26, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@mttmccb
Copy link

mttmccb commented Jul 26, 2021

You'll see it in the example pen, that the chips property isn't being applied https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples#vuetify-props, I tried on my dev environment and hide-selected did so unsure if it's a problem with this component. When inspecting the component (suing vue dev tools) the property is passed through but it's not rendered that way. Any ideas or possible workarounds for this?

@albanm
Copy link
Member

albanm commented Aug 17, 2021

Ah yes, sorry I missed this regression.

In order to support more cases vjsf defines the selection slot of the v-select component. Therefore some standard props are ignored. I don't really know what to do about that. I need to think about it, I see a few possibilities:

  • re-implement some of the props to recreate the original vuetify behavior (can create quite a lot of complexity)
  • either find a way to stop using the slot, or separate the cases where the slot is really necessary (I don't remember exactly what they are) and stop using it the rest of the time
  • just let it go as it is and fix the doc

@albanm albanm self-assigned this Aug 17, 2021
@albanm albanm added the bug Something isn't working label Aug 17, 2021
@xfavalon
Copy link

Hi!

I found a similar issue when I tried to pass a vuetify property of v-expansion-panel through 'x-props' in order to make a panel always opened or expanded. The property was readonly: true or disabled: true. But didn't work.

I checked ObjectContainer.js and I noticed that x-props are missing as a parameter in the render function of v-expansion-panel component. Check out line 132.

So, to solve my issue I added this: props: { ...schema['x-props'] }
image

I don´t know if this is a bug or I'm missing another way to achieve the same result but it works for me.

Thanks!

@IOIIOOIO
Copy link

IOIIOOIO commented Jan 6, 2022

I'd like to add a request for persistent-placeholder support. We use it on all our inputs so it would be very helpful.

Currently, this is my solution - but it has had side effects on one or two inputs in the project where we don't want the effect.

Globally, in a .scss file:

.v-text-field .v-label {
	transform: translateY(-18px) scale(0.81) !important;
}

@albanm
Copy link
Member

albanm commented Jan 6, 2022

Doesn't it already work with option fieldProps: {persistentPlaceholder: true} ?

@IOIIOOIO
Copy link

IOIIOOIO commented Jan 6, 2022

Doesn't it already work with option fieldProps: {persistentPlaceholder: true} ?

Perhaps I'm doing it wrong? I'm not sure where to put that in this example:

schema: {
		"type": "object",
		"properties": {
			"stringProp": {
				"fieldProps": {"persistentPlaceholder": true},
				"type": "string",
				"title": "I'm a string",
				"description": "This description is used as a help message.",
			},
		}
	},

@albanm
Copy link
Member

albanm commented Jan 6, 2022

schema: {
		"type": "object",
		"properties": {
			"stringProp": {
				"x-props": {"persistentPlaceholder": true},
				"type": "string",
				"title": "I'm a string",
				"description": "This description is used as a help message.",
			},
		}
	},

or for a more general application:

options="{fieldProps: {persistentPlaceholder: true}}"

@IOIIOOIO
Copy link

IOIIOOIO commented Jan 6, 2022

I'm a numbskull. Just realised that as you replied. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants