Skip to content
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

UIIN-2497 After creating a fast add instance record, only an empty detail view is displayed (third column) #2331

Merged
merged 6 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Make Inventory search and browse query boxes expandable. Refs UIIN-2493.
* Added support for `containsAny` match option in Advanced search. Refs UIIN-2486.
* Inventory search/browse: Do not retain checkbox selections when toggling search segment. Refs UIIN-2477.
* Show Instance record after creating with Fast add option. Refs UIIN-2497.

## [10.0.2] IN PROGRESS

Expand Down
13 changes: 12 additions & 1 deletion src/components/InstancesList/InstancesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,18 @@
}
}

toggleNewFastAddModal = () => {
toggleNewFastAddModal = ({ instanceRecord }) => {
const {
history,
location,
} = this.props;

if (instanceRecord?.id) {
history.push({
pathname: `/inventory/view/${instanceRecord.id}`,
search: location.search,
});
}
this.setState((state) => {
return { showNewFastAddModal: !state.showNewFastAddModal };
});
Expand Down Expand Up @@ -633,7 +644,7 @@
setSegmentSortBy = (sortBy) => {
const { segment } = this.props;

const segmentsSortBy = this.state.segmentsSortBy.map((key) => {

Check failure on line 647 in src/components/InstancesList/InstancesList.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

Use callback in setState when referencing the previous state

Check failure on line 647 in src/components/InstancesList/InstancesList.js

View workflow job for this annotation

GitHub Actions / github-actions-ci

Use callback in setState when referencing the previous state
if (key.name === segment) {
key.sort = sortBy;
return key;
Expand Down
Loading