chore: function renaming
This commit is contained in:
parent
9a0094cb5c
commit
683ed010f1
|
@ -208,7 +208,7 @@ export const Main = (props: {}) => {
|
||||||
const groupedTracks = useMemo(() => getGroupedTracks(disc), [disc]);
|
const groupedTracks = useMemo(() => getGroupedTracks(disc), [disc]);
|
||||||
|
|
||||||
// Action Handlers
|
// Action Handlers
|
||||||
const handleSelectClick = useCallback(
|
const handleSelectTrackClick = useCallback(
|
||||||
(event: React.MouseEvent, item: number) => {
|
(event: React.MouseEvent, item: number) => {
|
||||||
if (event.shiftKey && selected.length && lastClicked !== -1) {
|
if (event.shiftKey && selected.length && lastClicked !== -1) {
|
||||||
let rangeBegin = Math.min(lastClicked + 1, item),
|
let rangeBegin = Math.min(lastClicked + 1, item),
|
||||||
|
@ -361,7 +361,7 @@ export const Main = (props: {}) => {
|
||||||
handleRenameActionClick,
|
handleRenameActionClick,
|
||||||
handleRenameTrack,
|
handleRenameTrack,
|
||||||
handleSelectAllClick,
|
handleSelectAllClick,
|
||||||
handleSelectClick,
|
handleSelectTrackClick,
|
||||||
};
|
};
|
||||||
return <W95Main {...p} />;
|
return <W95Main {...p} />;
|
||||||
}
|
}
|
||||||
|
@ -499,7 +499,7 @@ export const Main = (props: {}) => {
|
||||||
inGroup={group.title !== null}
|
inGroup={group.title !== null}
|
||||||
isSelected={selected.includes(t.index)}
|
isSelected={selected.includes(t.index)}
|
||||||
isCurrentTrack={isCurrentTrack(t, deviceStatus)}
|
isCurrentTrack={isCurrentTrack(t, deviceStatus)}
|
||||||
onSelect={handleSelectClick}
|
onSelect={handleSelectTrackClick}
|
||||||
onRename={handleRenameTrack}
|
onRename={handleRenameTrack}
|
||||||
onPlay={handlePlayTrack}
|
onPlay={handlePlayTrack}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -108,7 +108,7 @@ export const W95Main = (props: {
|
||||||
handleRenameActionClick: (event: React.MouseEvent) => void;
|
handleRenameActionClick: (event: React.MouseEvent) => void;
|
||||||
handleRenameTrack: (event: React.MouseEvent, item: number) => void;
|
handleRenameTrack: (event: React.MouseEvent, item: number) => void;
|
||||||
handleSelectAllClick: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
handleSelectAllClick: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
||||||
handleSelectClick: (event: React.MouseEvent, item: number) => void;
|
handleSelectTrackClick: (event: React.MouseEvent, item: number) => void;
|
||||||
}) => {
|
}) => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const themeContext = useContext(ThemeContext);
|
const themeContext = useContext(ThemeContext);
|
||||||
|
@ -200,7 +200,7 @@ export const W95Main = (props: {
|
||||||
style={props.selected.includes(track.index) ? themeContext.selectedTableRow : {}}
|
style={props.selected.includes(track.index) ? themeContext.selectedTableRow : {}}
|
||||||
key={track.index}
|
key={track.index}
|
||||||
onDoubleClick={(event: React.MouseEvent) => props.handleRenameTrack(event, track.index)}
|
onDoubleClick={(event: React.MouseEvent) => props.handleRenameTrack(event, track.index)}
|
||||||
onClick={(event: React.MouseEvent) => props.handleSelectClick(event, track.index)}
|
onClick={(event: React.MouseEvent) => props.handleSelectTrackClick(event, track.index)}
|
||||||
>
|
>
|
||||||
<TableDataCell style={{ textAlign: 'center', width: '2ch' }}>{track.index + 1}</TableDataCell>
|
<TableDataCell style={{ textAlign: 'center', width: '2ch' }}>{track.index + 1}</TableDataCell>
|
||||||
<TableDataCell style={{ width: '80%' }}>
|
<TableDataCell style={{ width: '80%' }}>
|
||||||
|
|
Loading…
Reference in New Issue