-
Notifications
You must be signed in to change notification settings - Fork 2
Sample amount/units polish #1893
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
Changes from all commits
e552957
a243ef5
e9193d7
6a50e15
a64608c
f3f6e79
061973a
69becc7
53ab68e
38bb8f7
3adcd25
d5a1986
78af88b
1cf5e19
b5a909d
326b621
0acbce3
ae2374a
6f70a53
d920de4
eb01926
ee7df72
8655acf
8bf400f
e3b74e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,7 @@ import { | |
| } from './utils'; | ||
| import { LookupCell } from './LookupCell'; | ||
| import { DateInputCell } from './DateInputCell'; | ||
| import { NON_NEGATIVE_NUMBER_CONCEPT_URI } from '../domainproperties/constants'; | ||
|
|
||
| // CSS Order: top, right, bottom, left | ||
| export type BorderMask = [boolean, boolean, boolean, boolean]; | ||
|
|
@@ -532,6 +533,8 @@ export class Cell extends React.PureComponent<CellProps, undefined> { | |
| .filter(vd => vd && vd.display !== undefined) | ||
| .reduce((v, vd, i) => v + (i > 0 ? ', ' : '') + vd.display, ''); | ||
|
|
||
| const showMenu = (showLookup || !!col.inputRenderer) && (NON_NEGATIVE_NUMBER_CONCEPT_URI !== col?.conceptURI /*storedamount has inputRenderer but shouldn't show menu*/); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for adding the comment, that helps. But as mentioned in the other PR, this still seems odd that we are tying together the NON_NEGATIVE_NUMBER_CONCEPT_URI and the new stored amount input renderer. Those seem like different parts/pieces.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree it's a bit odd. But it's also odd that we always show the menu dropdown if there is an inputRenderer. I'll leave as is for now, maybe will come back to it when we get to the rest of the amount/units polish. |
||
|
|
||
| return ( | ||
| <> | ||
| <DisplayCell | ||
|
|
@@ -551,7 +554,7 @@ export class Cell extends React.PureComponent<CellProps, undefined> { | |
| placeholder={placeholder} | ||
| selected={selected} | ||
| selection={selection} | ||
| showMenu={showLookup || !!col.inputRenderer} | ||
| showMenu={showMenu} | ||
| targetRef={this.displayEl} | ||
| /> | ||
| {renderDragHandle && !this.isReadOnly && ( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.