Skip to content

Commit

Permalink
chore: renamed handleAllSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin101Zhang committed Aug 2, 2024
1 parent cd8f3d6 commit d60ef22
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/widgets/src/QueryApi.Launchpad.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ const handleFetchCheckboxData = async () => {
});
};

const handleSelectUnselectAll = (action) => {
const toggleAllSelection = (action) => {
const isMethodsTab = tab === 'methods_tab';
const isEventsTab = tab === 'events_tab';

Expand All @@ -477,7 +477,7 @@ const handleParentChange = (propertyName) => {
const isEventsTab = tab === 'events_tab';

if (propertyName === 'select_all' || propertyName === 'unselect_all') {
handleSelectUnselectAll(propertyName);
toggleAllSelection(propertyName);
return;
}

Expand Down Expand Up @@ -619,15 +619,15 @@ return (
<Checkbox
type="checkbox"
id="select_all"
onChange={() => handleSelectUnselectAll('select_all')}
onChange={() => toggleAllSelection('select_all')}
/>
Select All
</CheckboxLabel>
<CheckboxLabel>
<Checkbox
type="checkbox"
id="unselect_all"
onChange={() => handleSelectUnselectAll('unselect_all')}
onChange={() => toggleAllSelection('unselect_all')}
/>
Unselect All
</CheckboxLabel>
Expand Down Expand Up @@ -671,15 +671,15 @@ return (
<Checkbox
type="checkbox"
id="select_all_events"
onChange={() => handleSelectUnselectAll('select_all')}
onChange={() => toggleAllSelection('select_all')}
/>
Select All Events
</CheckboxLabel>
<CheckboxLabel>
<Checkbox
type="checkbox"
id="unselect_all_events"
onChange={() => handleSelectUnselectAll('unselect_all')}
onChange={() => toggleAllSelection('unselect_all')}
/>
Unselect All Events
</CheckboxLabel>
Expand Down

0 comments on commit d60ef22

Please sign in to comment.