Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

description vs description#77

Answeredbyx0k
jycouet asked this question inQ&A
Feb 19, 2025· 1 comments· 3 replies
Discussion options

Hi again,
The more I play with the lib the more I like it :)

Quick questions:

  • How do you choose betweenschema.properties.firstName.description anduiSchema.firstName.ui:options.description ? First schema and overwrite with uiSchema ? (Any special reason to have it in uiSchema then ?)
  • How do you get description to display markdown ? You used a custom component ?
  • is there a "readonly" mode ? (Not disable), to just display values ?
You must be logged in to vote
Answered by x0kFeb 19, 2025
  1. Values fromUiSchema always have higher priority, here is an exampledescription: uiOptions?.description ?? schema.description.
    The reasons for defining something inUiSchema can be different, for example I was making an editor forUiSchema so that the user could edit the form view without changing the data model.
  2. Yeah,this one. Not everyone needs markdown support by default, but it will increase the size of the bundle for everyone.
  3. You can makesome fields readonly using thereadOnly parameter in the json schema.
    You can make part or all of the form non-interactive using theinertattribute.

Replies: 1 comment 3 replies

Comment options

x0k
Feb 19, 2025
Maintainer

  1. Values fromUiSchema always have higher priority, here is an exampledescription: uiOptions?.description ?? schema.description.
    The reasons for defining something inUiSchema can be different, for example I was making an editor forUiSchema so that the user could edit the form view without changing the data model.
  2. Yeah,this one. Not everyone needs markdown support by default, but it will increase the size of the bundle for everyone.
  3. You can makesome fields readonly using thereadOnly parameter in the json schema.
    You can make part or all of the form non-interactive using theinertattribute.
You must be logged in to vote
3 replies
@jycouet
Comment options

Perfect and detailed answer. Thank you 👍

Your editor stuff is available somewhere ?
I started something similar 😅


I saw that a next version is coming ? Should I wait for it or should I start already diging more ? (I'm not in a hurry)

@x0k
Comment options

x0kFeb 19, 2025
Maintainer

Your editor stuff is available somewhere ?

No, it was a project at a previous job, I don't have that code anymore.
The only opensource part of that project isjson-table to display the collected responses in tabular form.

Should I wait for it or should I start already diging more ?

This depends on the functionality to be used.
In the simple case, you will have to replace

import {theme } from '...'const form = createForm3({...theme,...})...<RawForm {form} />

with

import {themeResolver } from '...'const theme = createTheme(themeResolver)const form = createForm({theme,...})setFormContext(form.context)...<SimpleForm />

If you plan to implement aUiSchema editor, you can count on the followinglist of options +title. The rest of the options will depend on the selected theme (example, a button defines a field to override its attributes).

I think the release won't be until next month at the earliest.

@jycouet
Comment options

Clear, thank you 👍

Answer selected byx0k
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@jycouet@x0k

[8]ページ先頭

©2009-2025 Movatter.jp