Replaces Button react component by native button to fix bug on 5.9 in collections and terms block.

This commit is contained in:
mateuswetah 2022-01-27 15:38:52 -03:00
parent c50e70b97a
commit 6c41741dc9
2 changed files with 14 additions and 10 deletions

View File

@ -35,11 +35,13 @@ export default function({ attributes, setAttributes, className, isSelected }) {
icon="no-alt"
label={__('Remove', 'tainacan')}/>
:
<Button
<button
onClick={ () => removeCollectionOfId(collection.id) }
icon="no-alt"
showTooltip={false}
label={__('Remove', 'tainacan')} />
type="button"
class="components-button has-icon"
aria-label={__('Remove', 'tainacan')}>
<span class="dashicon dashicons dashicons-no-alt" />
</button>
}
<a
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }

View File

@ -33,11 +33,13 @@ export default function({ attributes, setAttributes, className, isSelected }){
icon="no-alt"
label={__('Remove', 'tainacan')}/>
:
<Button
<button
onClick={ () => removeTermOfId(term.id) }
icon="no-alt"
showTooltip={false}
label={__('Remove', 'tainacan')}/>
type="button"
class="components-button has-icon"
aria-label={__('Remove', 'tainacan')}>
<span class="dashicon dashicons dashicons-no-alt" />
</button>
}
<a
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }