Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
7.2.17-SNAPSHOT (WIP)
==================

Bug fixes:
* [OLMIS-8177](https://openlmis.atlassian.net/browse/OLMIS-8177): React table input cells (packs/doses quantity) now show a "This field is required" tooltip when invalid, instead of a tooltip-less red mark.

7.2.16 / 2026-06-09
==================

Expand Down
13 changes: 9 additions & 4 deletions src/react-components/table/input-cell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import React, { useState, useEffect } from 'react';

import NumericInput from '../inputs/numeric-input';
import Input from '../inputs/input';
import WebTooltip from '../modals/web-tooltip';

const FIELD_REQUIRED_TOOLTIP = 'This field is required';

const InputCell = ({
value: initialValue,
Expand Down Expand Up @@ -58,10 +61,12 @@ const InputCell = ({
}, [showValidationErrors]);

return (
<div className={`form-control ${valid ? '' : 'is-invalid'}`}>
{numeric && <NumericInput value={value} onChange={onChange} onBlur={onBlur} disabled={disabled} {...props} />}
{!numeric && <Input value={value} onChange={onChange} onBlur={onBlur} disabled={disabled} {...props} />}
</div>
<WebTooltip shouldDisplayTooltip={!valid} tooltipContent={FIELD_REQUIRED_TOOLTIP}>
<div className={`form-control ${valid ? '' : 'is-invalid'}`}>
{numeric && <NumericInput value={value} onChange={onChange} onBlur={onBlur} disabled={disabled} {...props} />}
{!numeric && <Input value={value} onChange={onChange} onBlur={onBlur} disabled={disabled} {...props} />}
</div>
</WebTooltip>
);
};

Expand Down
Loading