File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ export const cssPropRenderer: InputRenderer = (knob: Knob, id: string) => {
42
42
43
43
export const propRenderer : InputRenderer = ( knob : Knob , id : string ) => {
44
44
const { name, type, value, options } = knob as PropertyInfo ;
45
- const inputType = getInputType ( type ) ;
46
45
let input ;
47
46
if ( type === 'select' && Array . isArray ( options ) ) {
48
47
input = html `
@@ -54,16 +53,6 @@ export const propRenderer: InputRenderer = (knob: Knob, id: string) => {
54
53
) }
55
54
</ select >
56
55
` ;
57
- } else if ( value === undefined ) {
58
- input = html `
59
- < input
60
- id ="${ id } "
61
- type ="${ inputType } "
62
- data-name ="${ name } "
63
- data-type ="${ type } "
64
- part ="input "
65
- />
66
- ` ;
67
56
} else if ( normalizeType ( type ) === 'boolean' ) {
68
57
input = html `
69
58
< input
@@ -79,8 +68,8 @@ export const propRenderer: InputRenderer = (knob: Knob, id: string) => {
79
68
input = html `
80
69
< input
81
70
id ="${ id } "
82
- type ="${ inputType } "
83
- .value ="${ String ( value ) } "
71
+ type ="${ getInputType ( type ) } "
72
+ .value ="${ value == null ? '' : String ( value ) } "
84
73
data-name ="${ name } "
85
74
data-type ="${ type } "
86
75
part ="input "
You can’t perform that action at this time.
0 commit comments