Skip to content

Conversation

CFarcy
Copy link
Contributor

@CFarcy CFarcy commented Feb 8, 2021

No description provided.

@CFarcy CFarcy requested review from jrmi and dtrucs February 8, 2021 07:58
@CFarcy CFarcy force-pushed the style-manual-discretization branch from f04fad7 to 977748d Compare February 8, 2021 09:41
CFarcy and others added 3 commits February 8, 2021 11:02
…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
Copy link
Collaborator

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')}
Copy link
Collaborator

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}>
Copy link
Collaborator

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 ?

const DEFAULT_MAX_CLASSES = 15;

const ColorListField = ({ value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => {
const ColorListField = ({ path, value, onChange = () => {}, maxClasses = DEFAULT_MAX_CLASSES }) => {
Copy link
Collaborator

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...

@CFarcy CFarcy marked this pull request as draft February 8, 2021 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants