jrs-react 1.2.17 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.es.js +22 -18
- package/build/index.js +22 -18
- package/package.json +1 -1
- package/src/app/fields/FieldsApp.jsx +24 -10
- package/src/app/fields/fieldsConfig.jsx +20 -8
- package/src/components/JRFields/JRFields.jsx +5 -3
- package/src/components/JRInput/JRRadio.jsx +1 -1
- package/src/components/JRInput/JRSelect.jsx +7 -7
- package/src/components/JRInput/JRText.jsx +6 -5
package/build/index.es.js
CHANGED
|
@@ -5332,6 +5332,7 @@ styled.div`
|
|
|
5332
5332
|
`;
|
|
5333
5333
|
const StyledGrid = styled.div`
|
|
5334
5334
|
display: grid;
|
|
5335
|
+
gap:10px;
|
|
5335
5336
|
grid: ${({
|
|
5336
5337
|
grid,
|
|
5337
5338
|
cols,
|
|
@@ -5348,6 +5349,7 @@ const StyledColumn = styled.div`
|
|
|
5348
5349
|
flex:1;
|
|
5349
5350
|
display: grid;
|
|
5350
5351
|
|
|
5352
|
+
|
|
5351
5353
|
${({
|
|
5352
5354
|
$layout,
|
|
5353
5355
|
$labelWidth,
|
|
@@ -5362,6 +5364,7 @@ const StyledColumn = styled.div`
|
|
|
5362
5364
|
}}
|
|
5363
5365
|
`;
|
|
5364
5366
|
const StyledColumnLabel = styled.div`
|
|
5367
|
+
min-height:24px;
|
|
5365
5368
|
${({
|
|
5366
5369
|
$layout
|
|
5367
5370
|
}) => {
|
|
@@ -5369,7 +5372,7 @@ const StyledColumnLabel = styled.div`
|
|
|
5369
5372
|
return `text-align: start;`;
|
|
5370
5373
|
} else {
|
|
5371
5374
|
return `text-align: end;
|
|
5372
|
-
padding:
|
|
5375
|
+
padding-right:10px;
|
|
5373
5376
|
`;
|
|
5374
5377
|
}
|
|
5375
5378
|
}}
|
|
@@ -5403,7 +5406,6 @@ const StyledColumnValue = styled.main`
|
|
|
5403
5406
|
flex:1;
|
|
5404
5407
|
flex-direction: column;
|
|
5405
5408
|
overflow: hidden;
|
|
5406
|
-
padding: 4px 0;
|
|
5407
5409
|
|
|
5408
5410
|
text-align: start;
|
|
5409
5411
|
${({
|
|
@@ -5703,7 +5705,7 @@ class JRFields extends JRWindow {
|
|
|
5703
5705
|
}
|
|
5704
5706
|
renderMe() {
|
|
5705
5707
|
return /*#__PURE__*/React__default.createElement(StyleJRFields, {
|
|
5706
|
-
className:
|
|
5708
|
+
className: `jr-fields`,
|
|
5707
5709
|
style: this.props.typeStyle
|
|
5708
5710
|
}, /*#__PURE__*/React__default.createElement(StyledGrid, {
|
|
5709
5711
|
cols: this.props.cols,
|
|
@@ -6092,7 +6094,7 @@ function JRAlert(props) {
|
|
|
6092
6094
|
})));
|
|
6093
6095
|
}
|
|
6094
6096
|
|
|
6095
|
-
const StyledInput = styled.div`
|
|
6097
|
+
const StyledInput$1 = styled.div`
|
|
6096
6098
|
display:flex;
|
|
6097
6099
|
input:focus{
|
|
6098
6100
|
outline: none;
|
|
@@ -6103,7 +6105,7 @@ class JRInput extends React__default.Component {
|
|
|
6103
6105
|
this.props?.onChange?.(value);
|
|
6104
6106
|
}
|
|
6105
6107
|
render() {
|
|
6106
|
-
return /*#__PURE__*/React__default.createElement(StyledInput, null, this.input());
|
|
6108
|
+
return /*#__PURE__*/React__default.createElement(StyledInput$1, null, this.input());
|
|
6107
6109
|
}
|
|
6108
6110
|
}
|
|
6109
6111
|
|
|
@@ -6138,12 +6140,14 @@ const StyledSelect = styled.select`
|
|
|
6138
6140
|
${({
|
|
6139
6141
|
size,
|
|
6140
6142
|
multiple
|
|
6141
|
-
}) => `${size == 1 || size == undefined && multiple != true ? 'height:
|
|
6143
|
+
}) => `${size == 1 || size == undefined && multiple != true ? 'height:24px;' : ''}`}
|
|
6142
6144
|
width: 100%;
|
|
6143
|
-
|
|
6145
|
+
min-height: 24px;
|
|
6146
|
+
|
|
6144
6147
|
option{
|
|
6145
6148
|
padding: 4px;
|
|
6146
|
-
height:
|
|
6149
|
+
height: 24px;
|
|
6150
|
+
min-height: 24px;
|
|
6147
6151
|
display: flex;
|
|
6148
6152
|
align-items: center;
|
|
6149
6153
|
}
|
|
@@ -6152,8 +6156,8 @@ class JRSelect extends JROptions {
|
|
|
6152
6156
|
renderer() {
|
|
6153
6157
|
const {
|
|
6154
6158
|
showBlank,
|
|
6155
|
-
valueName = '
|
|
6156
|
-
labelName = '
|
|
6159
|
+
valueName = 'value',
|
|
6160
|
+
labelName = 'label',
|
|
6157
6161
|
multiple,
|
|
6158
6162
|
size
|
|
6159
6163
|
} = this.props;
|
|
@@ -6162,7 +6166,7 @@ class JRSelect extends JROptions {
|
|
|
6162
6166
|
[valueName]: '',
|
|
6163
6167
|
[labelName]: ''
|
|
6164
6168
|
});
|
|
6165
|
-
return /*#__PURE__*/React__default.createElement(
|
|
6169
|
+
return /*#__PURE__*/React__default.createElement(StyledSelect, {
|
|
6166
6170
|
value: this.getValue() ?? (multiple ? [] : ''),
|
|
6167
6171
|
className: 'jr-select',
|
|
6168
6172
|
onChange: e => {
|
|
@@ -6185,7 +6189,7 @@ class JRSelect extends JROptions {
|
|
|
6185
6189
|
props.className = 'selected';
|
|
6186
6190
|
}
|
|
6187
6191
|
return /*#__PURE__*/React__default.createElement(StyledOption, props, record[labelName]);
|
|
6188
|
-
}))
|
|
6192
|
+
}));
|
|
6189
6193
|
}
|
|
6190
6194
|
}
|
|
6191
6195
|
|
|
@@ -6193,7 +6197,7 @@ const StyledPick = styled.div`
|
|
|
6193
6197
|
>label{
|
|
6194
6198
|
white-space: nowrap;
|
|
6195
6199
|
display: inline-flex;
|
|
6196
|
-
align-items:
|
|
6200
|
+
align-items: baseline;
|
|
6197
6201
|
height: 30px;
|
|
6198
6202
|
padding-right: 12px;
|
|
6199
6203
|
}
|
|
@@ -6270,14 +6274,14 @@ class JRCheckbox extends JROptions {
|
|
|
6270
6274
|
}
|
|
6271
6275
|
}
|
|
6272
6276
|
|
|
6277
|
+
const StyledInput = styled.input`
|
|
6278
|
+
min-height: 24px;
|
|
6279
|
+
width: 100%;
|
|
6280
|
+
`;
|
|
6273
6281
|
class JRText extends JRInput {
|
|
6274
6282
|
input() {
|
|
6275
|
-
return /*#__PURE__*/React__default.createElement(
|
|
6283
|
+
return /*#__PURE__*/React__default.createElement(StyledInput, {
|
|
6276
6284
|
value: this.props.value ?? '',
|
|
6277
|
-
style: {
|
|
6278
|
-
height: '24px',
|
|
6279
|
-
width: '100%'
|
|
6280
|
-
},
|
|
6281
6285
|
onChange: e => {
|
|
6282
6286
|
this.setValue(e.target.value);
|
|
6283
6287
|
}
|
package/build/index.js
CHANGED
|
@@ -5359,6 +5359,7 @@ styled__default["default"].div`
|
|
|
5359
5359
|
`;
|
|
5360
5360
|
const StyledGrid = styled__default["default"].div`
|
|
5361
5361
|
display: grid;
|
|
5362
|
+
gap:10px;
|
|
5362
5363
|
grid: ${({
|
|
5363
5364
|
grid,
|
|
5364
5365
|
cols,
|
|
@@ -5375,6 +5376,7 @@ const StyledColumn = styled__default["default"].div`
|
|
|
5375
5376
|
flex:1;
|
|
5376
5377
|
display: grid;
|
|
5377
5378
|
|
|
5379
|
+
|
|
5378
5380
|
${({
|
|
5379
5381
|
$layout,
|
|
5380
5382
|
$labelWidth,
|
|
@@ -5389,6 +5391,7 @@ const StyledColumn = styled__default["default"].div`
|
|
|
5389
5391
|
}}
|
|
5390
5392
|
`;
|
|
5391
5393
|
const StyledColumnLabel = styled__default["default"].div`
|
|
5394
|
+
min-height:24px;
|
|
5392
5395
|
${({
|
|
5393
5396
|
$layout
|
|
5394
5397
|
}) => {
|
|
@@ -5396,7 +5399,7 @@ const StyledColumnLabel = styled__default["default"].div`
|
|
|
5396
5399
|
return `text-align: start;`;
|
|
5397
5400
|
} else {
|
|
5398
5401
|
return `text-align: end;
|
|
5399
|
-
padding:
|
|
5402
|
+
padding-right:10px;
|
|
5400
5403
|
`;
|
|
5401
5404
|
}
|
|
5402
5405
|
}}
|
|
@@ -5430,7 +5433,6 @@ const StyledColumnValue = styled__default["default"].main`
|
|
|
5430
5433
|
flex:1;
|
|
5431
5434
|
flex-direction: column;
|
|
5432
5435
|
overflow: hidden;
|
|
5433
|
-
padding: 4px 0;
|
|
5434
5436
|
|
|
5435
5437
|
text-align: start;
|
|
5436
5438
|
${({
|
|
@@ -5730,7 +5732,7 @@ class JRFields extends JRWindow {
|
|
|
5730
5732
|
}
|
|
5731
5733
|
renderMe() {
|
|
5732
5734
|
return /*#__PURE__*/React__default["default"].createElement(StyleJRFields, {
|
|
5733
|
-
className:
|
|
5735
|
+
className: `jr-fields`,
|
|
5734
5736
|
style: this.props.typeStyle
|
|
5735
5737
|
}, /*#__PURE__*/React__default["default"].createElement(StyledGrid, {
|
|
5736
5738
|
cols: this.props.cols,
|
|
@@ -6119,7 +6121,7 @@ function JRAlert(props) {
|
|
|
6119
6121
|
})));
|
|
6120
6122
|
}
|
|
6121
6123
|
|
|
6122
|
-
const StyledInput = styled__default["default"].div`
|
|
6124
|
+
const StyledInput$1 = styled__default["default"].div`
|
|
6123
6125
|
display:flex;
|
|
6124
6126
|
input:focus{
|
|
6125
6127
|
outline: none;
|
|
@@ -6130,7 +6132,7 @@ class JRInput extends React__default["default"].Component {
|
|
|
6130
6132
|
this.props?.onChange?.(value);
|
|
6131
6133
|
}
|
|
6132
6134
|
render() {
|
|
6133
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledInput, null, this.input());
|
|
6135
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledInput$1, null, this.input());
|
|
6134
6136
|
}
|
|
6135
6137
|
}
|
|
6136
6138
|
|
|
@@ -6165,12 +6167,14 @@ const StyledSelect = styled__default["default"].select`
|
|
|
6165
6167
|
${({
|
|
6166
6168
|
size,
|
|
6167
6169
|
multiple
|
|
6168
|
-
}) => `${size == 1 || size == undefined && multiple != true ? 'height:
|
|
6170
|
+
}) => `${size == 1 || size == undefined && multiple != true ? 'height:24px;' : ''}`}
|
|
6169
6171
|
width: 100%;
|
|
6170
|
-
|
|
6172
|
+
min-height: 24px;
|
|
6173
|
+
|
|
6171
6174
|
option{
|
|
6172
6175
|
padding: 4px;
|
|
6173
|
-
height:
|
|
6176
|
+
height: 24px;
|
|
6177
|
+
min-height: 24px;
|
|
6174
6178
|
display: flex;
|
|
6175
6179
|
align-items: center;
|
|
6176
6180
|
}
|
|
@@ -6179,8 +6183,8 @@ class JRSelect extends JROptions {
|
|
|
6179
6183
|
renderer() {
|
|
6180
6184
|
const {
|
|
6181
6185
|
showBlank,
|
|
6182
|
-
valueName = '
|
|
6183
|
-
labelName = '
|
|
6186
|
+
valueName = 'value',
|
|
6187
|
+
labelName = 'label',
|
|
6184
6188
|
multiple,
|
|
6185
6189
|
size
|
|
6186
6190
|
} = this.props;
|
|
@@ -6189,7 +6193,7 @@ class JRSelect extends JROptions {
|
|
|
6189
6193
|
[valueName]: '',
|
|
6190
6194
|
[labelName]: ''
|
|
6191
6195
|
});
|
|
6192
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
6196
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledSelect, {
|
|
6193
6197
|
value: this.getValue() ?? (multiple ? [] : ''),
|
|
6194
6198
|
className: 'jr-select',
|
|
6195
6199
|
onChange: e => {
|
|
@@ -6212,7 +6216,7 @@ class JRSelect extends JROptions {
|
|
|
6212
6216
|
props.className = 'selected';
|
|
6213
6217
|
}
|
|
6214
6218
|
return /*#__PURE__*/React__default["default"].createElement(StyledOption, props, record[labelName]);
|
|
6215
|
-
}))
|
|
6219
|
+
}));
|
|
6216
6220
|
}
|
|
6217
6221
|
}
|
|
6218
6222
|
|
|
@@ -6220,7 +6224,7 @@ const StyledPick = styled__default["default"].div`
|
|
|
6220
6224
|
>label{
|
|
6221
6225
|
white-space: nowrap;
|
|
6222
6226
|
display: inline-flex;
|
|
6223
|
-
align-items:
|
|
6227
|
+
align-items: baseline;
|
|
6224
6228
|
height: 30px;
|
|
6225
6229
|
padding-right: 12px;
|
|
6226
6230
|
}
|
|
@@ -6297,14 +6301,14 @@ class JRCheckbox extends JROptions {
|
|
|
6297
6301
|
}
|
|
6298
6302
|
}
|
|
6299
6303
|
|
|
6304
|
+
const StyledInput = styled__default["default"].input`
|
|
6305
|
+
min-height: 24px;
|
|
6306
|
+
width: 100%;
|
|
6307
|
+
`;
|
|
6300
6308
|
class JRText extends JRInput {
|
|
6301
6309
|
input() {
|
|
6302
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
6310
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledInput, {
|
|
6303
6311
|
value: this.props.value ?? '',
|
|
6304
|
-
style: {
|
|
6305
|
-
height: '24px',
|
|
6306
|
-
width: '100%'
|
|
6307
|
-
},
|
|
6308
6312
|
onChange: e => {
|
|
6309
6313
|
this.setValue(e.target.value);
|
|
6310
6314
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import JRFields from "../../components/JRFields/JRFields";
|
|
4
|
-
import {
|
|
5
|
-
import { devFields, normalFields, withSomeButton } from "./fieldsConfig";
|
|
6
|
-
// import { tryHOC } from "./tryHOC";
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { devFields, withSomeButton } from "./fieldsConfig";
|
|
9
5
|
|
|
10
6
|
const StyledJRFields=styled(JRFields)`
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
>Xmain{
|
|
8
|
+
>main{
|
|
9
|
+
>main{
|
|
10
|
+
>main{
|
|
11
|
+
>.jr-grid{
|
|
12
|
+
padding:0;
|
|
13
|
+
margin:10px;
|
|
14
|
+
gap:0;
|
|
15
|
+
border-top: 1px solid white;
|
|
16
|
+
border-right: 1px solid white;
|
|
17
|
+
|
|
18
|
+
>.jr-column{
|
|
19
|
+
border-bottom:1px solid white;
|
|
20
|
+
border-left:1px solid white;
|
|
21
|
+
padding:10px ;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
14
28
|
}
|
|
29
|
+
|
|
15
30
|
`
|
|
16
31
|
export default function FieldsApp() {
|
|
17
32
|
return <>
|
|
18
|
-
<
|
|
33
|
+
<StyledJRFields
|
|
19
34
|
initValue={{
|
|
20
35
|
checkbox:[1,3,5]
|
|
21
36
|
,select:[2]
|
|
@@ -25,7 +40,6 @@ export default function FieldsApp() {
|
|
|
25
40
|
open={true}
|
|
26
41
|
popup={false}
|
|
27
42
|
width={900}
|
|
28
|
-
// height={800}
|
|
29
43
|
title={'Fields'}
|
|
30
44
|
/>
|
|
31
45
|
</>
|
|
@@ -6,7 +6,7 @@ import JRTable from "../../components/JRTable/JRTable";
|
|
|
6
6
|
import { po } from "../../components/JRUtils";
|
|
7
7
|
import styled from "styled-components";
|
|
8
8
|
import JRCheckbox from "../../components/JRInput/JRCheckbox";
|
|
9
|
-
import
|
|
9
|
+
import JRRadio from "../../components/JRInput/JRRadio";
|
|
10
10
|
|
|
11
11
|
export const fieldsConfig={
|
|
12
12
|
popup:true
|
|
@@ -145,6 +145,7 @@ export const normalFields={
|
|
|
145
145
|
url:'data.json'
|
|
146
146
|
,autoRun:true
|
|
147
147
|
}
|
|
148
|
+
|
|
148
149
|
,columns:[
|
|
149
150
|
{name:'name',label:'Name',type:JRText,required:true}
|
|
150
151
|
,{name:'account',label:'Account',type:JRText
|
|
@@ -184,10 +185,22 @@ export const normalFields={
|
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
,{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
columns:[
|
|
189
|
+
{name:'father',label:'Father',type:JRText,required:true
|
|
190
|
+
,labelProps:{
|
|
191
|
+
width:'min-content'
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
,{name:'mother',label:'Mother',type:JRText,required:true
|
|
195
|
+
,labelProps:{
|
|
196
|
+
width:'min-content'
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
,{name:'yo',label:'Yo',type:JRText,required:true
|
|
200
|
+
,labelProps:{
|
|
201
|
+
width:'min-content'
|
|
202
|
+
}
|
|
203
|
+
}
|
|
191
204
|
]
|
|
192
205
|
,cols:2
|
|
193
206
|
,columnStyle:{
|
|
@@ -388,9 +401,7 @@ export const devFields={
|
|
|
388
401
|
]
|
|
389
402
|
,cols:2
|
|
390
403
|
,columnStyle:{
|
|
391
|
-
|
|
392
|
-
,marginTop: '4px'
|
|
393
|
-
,border:'1px solid black'
|
|
404
|
+
border:'1px solid black'
|
|
394
405
|
,borderRadius: '3px'
|
|
395
406
|
}
|
|
396
407
|
,colSpan:2
|
|
@@ -454,6 +465,7 @@ export const devFields={
|
|
|
454
465
|
}
|
|
455
466
|
,multiple:true
|
|
456
467
|
,required:true
|
|
468
|
+
,colSpan:2
|
|
457
469
|
}
|
|
458
470
|
]
|
|
459
471
|
,cols:2
|
|
@@ -28,6 +28,7 @@ const StyledGridFrame = styled.div`
|
|
|
28
28
|
|
|
29
29
|
const StyledGrid = styled.div`
|
|
30
30
|
display: grid;
|
|
31
|
+
gap:10px;
|
|
31
32
|
grid: ${({ grid, cols, children }) =>
|
|
32
33
|
grid
|
|
33
34
|
? grid
|
|
@@ -45,6 +46,7 @@ const StyledColumn=styled.div`
|
|
|
45
46
|
flex:1;
|
|
46
47
|
display: grid;
|
|
47
48
|
|
|
49
|
+
|
|
48
50
|
${({$layout,$labelWidth,$hasLabel,$valueWidth})=>{
|
|
49
51
|
if($layout=='v'){
|
|
50
52
|
return `grid: auto 1fr / 1fr;`
|
|
@@ -54,12 +56,13 @@ const StyledColumn=styled.div`
|
|
|
54
56
|
}}
|
|
55
57
|
`
|
|
56
58
|
const StyledColumnLabel=styled.div`
|
|
59
|
+
min-height:24px;
|
|
57
60
|
${({$layout})=>{
|
|
58
61
|
if($layout=='v'){
|
|
59
62
|
return `text-align: start;`
|
|
60
63
|
}else{
|
|
61
64
|
return `text-align: end;
|
|
62
|
-
padding:
|
|
65
|
+
padding-right:10px;
|
|
63
66
|
`
|
|
64
67
|
}
|
|
65
68
|
}}
|
|
@@ -90,7 +93,6 @@ const StyledColumnValue=styled.main`
|
|
|
90
93
|
flex:1;
|
|
91
94
|
flex-direction: column;
|
|
92
95
|
overflow: hidden;
|
|
93
|
-
padding: 4px 0;
|
|
94
96
|
|
|
95
97
|
text-align: start;
|
|
96
98
|
${({$validateValue})=>{
|
|
@@ -447,7 +449,7 @@ export default class JRFields extends JRWindow {
|
|
|
447
449
|
}
|
|
448
450
|
|
|
449
451
|
renderMe(){
|
|
450
|
-
return <StyleJRFields className={
|
|
452
|
+
return <StyleJRFields className={`jr-fields`} style={this.props.typeStyle}>
|
|
451
453
|
<StyledGrid cols={this.props.cols} style={this.props.gridStyle} className={'jr-grid'} $gap={this.props.gap}>
|
|
452
454
|
{
|
|
453
455
|
this.createColumns(
|
|
@@ -7,23 +7,24 @@ import styled from "styled-components";
|
|
|
7
7
|
const StyledOption=styled.option`
|
|
8
8
|
`
|
|
9
9
|
const StyledSelect=styled.select`
|
|
10
|
-
${({size,multiple})=>`${size==1 || (size==undefined && multiple!=true)?'height:
|
|
10
|
+
${({size,multiple})=>`${size==1 || (size==undefined && multiple!=true)?'height:24px;':''}`}
|
|
11
11
|
width: 100%;
|
|
12
|
-
|
|
12
|
+
min-height: 24px;
|
|
13
|
+
|
|
13
14
|
option{
|
|
14
15
|
padding: 4px;
|
|
15
|
-
height:
|
|
16
|
+
height: 24px;
|
|
17
|
+
min-height: 24px;
|
|
16
18
|
display: flex;
|
|
17
19
|
align-items: center;
|
|
18
20
|
}
|
|
19
21
|
`
|
|
20
22
|
export default class JRSelect extends JROptions{
|
|
21
23
|
renderer(){
|
|
22
|
-
const {showBlank,valueName='
|
|
24
|
+
const {showBlank,valueName='value',labelName='label',multiple,size}=this.props
|
|
23
25
|
const options=[...this.getOptions()??[]]
|
|
24
26
|
if(multiple!=true && showBlank!=false)options.unshift({[valueName]:'',[labelName]:''})
|
|
25
|
-
return
|
|
26
|
-
<StyledSelect
|
|
27
|
+
return <StyledSelect
|
|
27
28
|
value={this.getValue()??(multiple?[]:'')}
|
|
28
29
|
className={'jr-select'}
|
|
29
30
|
onChange={(e)=>{
|
|
@@ -59,6 +60,5 @@ export default class JRSelect extends JROptions{
|
|
|
59
60
|
})
|
|
60
61
|
}
|
|
61
62
|
</StyledSelect>
|
|
62
|
-
</>
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import JRInput from "./JRInput";
|
|
3
|
+
import styled from "styled-components";
|
|
3
4
|
|
|
5
|
+
const StyledInput=styled.input`
|
|
6
|
+
min-height: 24px;
|
|
7
|
+
width: 100%;
|
|
8
|
+
`
|
|
4
9
|
export default class JRText extends JRInput{
|
|
5
10
|
input(){
|
|
6
|
-
return <
|
|
7
|
-
style={{
|
|
8
|
-
height: '24px'
|
|
9
|
-
,width: '100%'
|
|
10
|
-
}}
|
|
11
|
+
return <StyledInput value={this.props.value??''}
|
|
11
12
|
onChange={(e)=>{
|
|
12
13
|
this.setValue(e.target.value)
|
|
13
14
|
}}
|