File tree Expand file tree Collapse file tree 4 files changed +6
-2
lines changed
Expand file tree Collapse file tree 4 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export const Icon = props => {
6262 attrNameTemplate = '%s' ,
6363 hasLinearGradient = true ,
6464 value = '' ,
65+ defaultValue = '' ,
6566 onChange = NOOP ,
6667 openEvenIfUnselected = false ,
6768 } = props
@@ -177,6 +178,7 @@ export const Icon = props => {
177178 }
178179 setIsOpen ( false )
179180 } }
181+ defaultValue = { defaultValue }
180182 />
181183 ) }
182184 { getAttribute ( 'icon2' ) && (
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const Edit = props => {
8484 className = { blockClassNames }
8585 >
8686 < Link linkTrigger = ".stk--inner-svg" >
87- < Icon />
87+ < Icon defaultValue = { defaultIcon } />
8888 </ Link >
8989 </ BlockDiv >
9090 { props . isHovered && < MarginBottom /> }
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ const IconControl = props => {
3131 { ...omit ( props , [ 'onChange' , 'value' ] ) }
3232 allowReset = { true }
3333 value = { props . value }
34+ defaultValue = { props . defaultValue }
3435 onChange = { props . onChange }
3536 hasPanelModifiedIndicator = { props . hasPanelModifiedIndicator }
3637 >
@@ -54,6 +55,7 @@ const IconControl = props => {
5455 onClose = { onClose }
5556 returnSVGValue = { props . returnSVGValue }
5657 onChange = { props . onChange }
58+ defaultValue = { props . defaultValue }
5759 />
5860 ) }
5961 />
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ const IconSearchPopover = props => {
231231 { props . allowReset &&
232232 < Button
233233 onClick = { ( ) => {
234- props . onChange ( '' )
234+ props . onChange ( props . defaultValue || '' )
235235 props . onClose ( )
236236 } }
237237 isSmall
You can’t perform that action at this time.
0 commit comments