Skip to content

Commit 9ccc1a8

Browse files
committed
Update docs and playground
1 parent 421d5cf commit 9ccc1a8

File tree

4 files changed

+42
-9
lines changed

4 files changed

+42
-9
lines changed

docs/docs/usage/browser.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ which may contain these keys:
100100
- `fileHandler` *(Optional)*: URL for the common file handler endpoint for all file fields.
101101
- `fileHandlerArgs` *(Optional)*: Key-value pairs which will be sent via querystring to the `fileHandler` URL.
102102
- `errorMap` *(Optional)*: An object containing error messages for fields.
103+
- `readonly` *(Optional)*: A boolean. If `true`, the whole form will be read-only.
103104

104-
*Changed in version 2.1*: `errorMap` option was added.
105-
*Changed in version 2.2*: `fileHandlerArgs` option was added.
105+
*Changed in version 2.1*: `errorMap` option was added.
106+
*Changed in version 2.2*: `fileHandlerArgs` option was added.
107+
*Changed in version 2.10*: `readonly` option was added.
106108

107109

108110
##### `reactJsonForm.getFormInstance(containerId)`

docs/docs/usage/node.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ class MyComponent extends React.Component {
7171
- `fileHandler`: A URL to a common file handler endpoint for all file input fields.
7272
- `fileHandlerArgs` (*Optional*): Key-value pairs which will be sent via querystring to the `fileHandler` URL.
7373
- `errorMap`: An object containing error messages for input fields. [See data validation section](#data-validation)
74-
for more.
74+
for more.
75+
- `readonly`: A boolean. If `true`, the whole form will be read-only.
7576

76-
*Changed in version 2.1*: `errorMap` prop was added.
77+
*Changed in version 2.1*: `errorMap` prop was added.
78+
*Changed in version 2.10*: `readonly` prop was added.
7779

7880
## `EditorState` API reference
7981

docs/static/css/docs.css

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,10 @@ label {
450450
width: auto;
451451
float: none;
452452
}
453-
input, textarea, select {
453+
input, textarea, select, .rjf-multiselect-field-input {
454454
display: block;
455455
width: 100%;
456-
min-width: 8rem;
456+
min-width: 12rem;
457457
padding: .25rem .5rem;
458458
font-size: inherit;
459459
font-weight: 400;
@@ -465,7 +465,7 @@ input, textarea, select {
465465
border-radius: .25rem;
466466
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
467467
}
468-
input:focus, textarea:focus, select:focus {
468+
input:focus, textarea:focus, select:focus, .rjf-multiselect-field-input:focus {
469469
color: #495057;
470470
background-color: #fff;
471471
border-color: #f0f;
@@ -966,6 +966,35 @@ button.rjf-add-button:hover {
966966
background-position: right 6px center;
967967
background-size: 16px 12px;
968968
}
969+
.rjf-multiselect-field-input-item {
970+
display: inline-block;
971+
margin-right: 4px;
972+
margin-bottom: 4px;
973+
background-color: #eee;
974+
border-radius: 4px;
975+
line-height: 1;
976+
}
977+
.rjf-multiselect-field-input-item > span {
978+
display: inline-block;
979+
vertical-align: middle;
980+
color: #000;
981+
padding: 3px 6px;
982+
line-height: 1;
983+
}
984+
.rjf-multiselect-field-input-item > button {
985+
display: inline-block;
986+
vertical-align: middle;
987+
background-color: transparent;
988+
border: 0;
989+
font-size: 1rem;
990+
padding: 3px 6px;
991+
line-height: 1;
992+
border-radius: 0 4px 4px 0;
993+
}
994+
.rjf-multiselect-field-input-item > button:hover {
995+
color: #ee0038;
996+
background-color: #ffdbe0;
997+
}
969998
.rjf-multiselect-field-options-container {
970999
position: absolute;
9711000
background-color: #fff;

docs/static/js/playground.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)