Skip to content

Commit

Permalink
allow save empty selected records
Browse files Browse the repository at this point in the history
  • Loading branch information
usavkov-epam committed Dec 8, 2023
1 parent 15e7cc5 commit 7c532e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/FindLocation/FindLocationLookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const FindLocationLookup = (props) => {
stickyFirstColumn={isMultiSelect}
renderActionMenu={() => renderColumnsMenu}
renderFilters={renderFilters}
preventNonSelectedSubmit={false}
{...rest}
/>
)}
Expand Down
5 changes: 4 additions & 1 deletion lib/FindRecords/FindRecordsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const FindRecordsModal = ({
modalRef,
renderNewBtn,
idPrefix,
preventNonSelectedSubmit,
// table config props
columnMapping,
columnWidths,
Expand Down Expand Up @@ -146,7 +147,7 @@ export const FindRecordsModal = ({
<Button
buttonStyle="primary"
data-test-find-records-modal-save
disabled={!selectedRecordsLength}
disabled={preventNonSelectedSubmit && !selectedRecordsLength}
marginBottom0
onClick={saveMultiple}
>
Expand Down Expand Up @@ -302,6 +303,7 @@ FindRecordsModal.propTypes = {
modalLabel: PropTypes.node,
modalRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
renderNewBtn: PropTypes.func,
preventNonSelectedSubmit: PropTypes.bool,
// table config props
columnMapping: PropTypes.object,
columnWidths: PropTypes.object,
Expand Down Expand Up @@ -336,4 +338,5 @@ FindRecordsModal.defaultProps = {
resultsFormatter: {},
isMultiSelect: false,
resetData: noop,
preventNonSelectedSubmit: true,
};

0 comments on commit 7c532e1

Please sign in to comment.