-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual discretization method for styles #352
base: master
Are you sure you want to change the base?
Conversation
src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js
Outdated
Show resolved
Hide resolved
f04fad7
to
977748d
Compare
src/modules/RA/DataLayer/components/tabs/StyleTab/Style/ColorListField.js
Outdated
Show resolved
Hide resolved
…istField.js Co-authored-by: Jérémie Pardou-Piquemal <jeremie.pardou@makina-corpus.com>
Co-authored-by: Jérémie Pardou-Piquemal <jeremie.pardou@makina-corpus.com>
Co-authored-by: Jérémie Pardou-Piquemal <jeremie.pardou@makina-corpus.com>
// eslint-disable-next-line react/no-array-index-key | ||
<React.Fragment key={index}> | ||
<Condition when={`${path}.method`} is="manual"> | ||
<Field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you use react-admin NumberInput
here ?
> | ||
{({ meta, input: { value: boundValue, onChange: onBoundChange } }) => ( | ||
<TextField | ||
label={translate('datalayer.form.styles.step')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use same translation prefix as other field.
onChange={handleColorChange(index)} | ||
/> | ||
// eslint-disable-next-line react/no-array-index-key | ||
<React.Fragment key={index}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a validation for step order ?
|
||
import styles from './styles'; | ||
|
||
const useStyles = makeStyles(styles); | ||
|
||
const DEFAULT_MAX_CLASSES = 15; | ||
|
||
const ColorListField = ({ value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => { | ||
const ColorListField = ({ path, value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a colorListField anymore...
No description provided.