Skip to content

Commit

Permalink
Fix: control caching issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Apr 12, 2024
1 parent e796463 commit 8b5e95e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const SectionSelector = ({ firstElement, selectedElementIds }) => {
</Popover>
</div>
<Select
key={selectedElementIds?.join(",")}
onValueChange={(value) => {
store.dispatch(updatePolylines({ ids: selectedElementIds, data: { section: +value === 0 ? null : value } }));
}}
Expand Down
1 change: 1 addition & 0 deletions src/components/controls/select/seats/categorizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const Categorizer = ({ firstElement, selectedElementIds }) => {
</Popover>
</div>
<Select
key={selectedElementIds?.join(",")}
onValueChange={(value) => {
store.dispatch(updateSeats({ ids: selectedElementIds, data: { category: value } }));
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/select/seats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const SeatSelectControls = () => {
/>
</div>
<RadioGroup
key={firstElement?.getAttribute(dataAttributes.status)}
key={selectedElementIds?.join(",")}
defaultValue={firstElement?.getAttribute(dataAttributes.status) ?? SeatStatus.Available.toString()}
onValueChange={(value) => {
selectedElementIds.forEach((id: string) => {
Expand Down

0 comments on commit 8b5e95e

Please sign in to comment.