Skip to content

Commit

Permalink
Merge pull request #784 from wowsims/feature/port-cata-improvements
Browse files Browse the repository at this point in the history
[Bug] fix removing random suffixes
  • Loading branch information
kayla-glick authored Jun 9, 2024
2 parents d9f9130 + 816774b commit 8a66046
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/core/components/gear_picker/selector_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export default class SelectorModal extends BaseModal {
onRemove: (eventID: number) => {
const equippedItem = gearData.getEquippedItem();
if (equippedItem) {
gearData.equipItem(eventID, equippedItem.withRandomSuffix(null));
gearData.equipItem(eventID, equippedItem.withItem(equippedItem.item).withRandomSuffix(null));
}
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export default class BulkItemPicker extends Component {
<i className="fas fa-times" />
</button>,
);
removeBtn.value!.addEventListener('click', () => this.bulkUI.removeItemByIndex(this.index));
const removeItem = () => this.bulkUI.removeItemByIndex(this.index);
removeBtn.value!.addEventListener('click', removeItem);
this.addOnDisposeCallback(() => removeBtn.value!.removeEventListener('click', removeItem));

this.simUI.sim.waitForInit().then(() => {
this.setItem(item);
Expand Down
2 changes: 2 additions & 0 deletions ui/scss/core/components/individual_sim_ui/_bulk_tab.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import './bulk';

.bulk-tab {
.bulk-tab-right {
.content-block-body {
Expand Down
2 changes: 0 additions & 2 deletions ui/scss/core/individual_sim_ui/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

// Import Individual Sim UI Styles
@import './shared';
@import './bulk';

// Import component styles
@import '../components/boolean_picker';
Expand All @@ -12,7 +11,6 @@
@import '../components/encounter_picker';
@import '../components/exporters';
@import '../components/enum_picker';
@import '../components/bulk';
@import '../components/gear_picker';
@import '../components/icon_enum_picker';
@import '../components/icon_picker';
Expand Down

0 comments on commit 8a66046

Please sign in to comment.