mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-16 04:26:27 +03:00
Fix quickstart default checked of conditional fields [ci skip]
This commit is contained in:
parent
ffaa0d6b9b
commit
62a01956c3
|
@ -105,12 +105,13 @@ const Quickstart = ({
|
|||
multiple,
|
||||
other,
|
||||
help,
|
||||
hidden,
|
||||
}) => {
|
||||
// Optional function that's called with the value
|
||||
const setterFunc = setters[id] || (() => {})
|
||||
// Check if dropdown should be shown
|
||||
const dropdownGetter = showDropdown[id] || (() => true)
|
||||
return (
|
||||
return hidden ? null : (
|
||||
<div key={id} data-quickstart-group={id} className={classes.group}>
|
||||
<style data-quickstart-style={id} scoped>
|
||||
{styles[id] ||
|
||||
|
|
|
@ -115,7 +115,9 @@ export default function QuickstartTraining({ id, title, download = 'base_config.
|
|||
}))
|
||||
.sort((a, b) => a.title.localeCompare(b.title))
|
||||
if (!_components.includes('textcat')) {
|
||||
data = data.filter(({ id }) => id !== 'textcat')
|
||||
data = data.map(field =>
|
||||
field.id === 'textcat' ? { ...field, hidden: true } : field
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Quickstart
|
||||
|
|
Loading…
Reference in New Issue
Block a user