kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Correctly autofocus on poll input
rodzic
f211792085
commit
fe9ce637e8
|
@ -7,7 +7,7 @@ import AutosuggestInput from 'soapbox/components/autosuggest_input';
|
||||||
import { Button, Divider, HStack, Stack, Text, Toggle } from 'soapbox/components/ui';
|
import { Button, Divider, HStack, Stack, Text, Toggle } from 'soapbox/components/ui';
|
||||||
import { useAppSelector } from 'soapbox/hooks';
|
import { useAppSelector } from 'soapbox/hooks';
|
||||||
|
|
||||||
import DurationSelector from './polls/duration-selector';
|
import DurationSelector from './duration-selector';
|
||||||
|
|
||||||
import type { AutoSuggestion } from 'soapbox/components/autosuggest_input';
|
import type { AutoSuggestion } from 'soapbox/components/autosuggest_input';
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ const Option = (props: IOption) => {
|
||||||
onSuggestionsClearRequested={onSuggestionsClearRequested}
|
onSuggestionsClearRequested={onSuggestionsClearRequested}
|
||||||
onSuggestionSelected={onSuggestionSelected}
|
onSuggestionSelected={onSuggestionSelected}
|
||||||
searchTokens={[':']}
|
searchTokens={[':']}
|
||||||
autoFocus={index === 0}
|
autoFocus={index === 0 || index >= 2}
|
||||||
/>
|
/>
|
||||||
</HStack>
|
</HStack>
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
fetchComposeSuggestions,
|
fetchComposeSuggestions,
|
||||||
selectComposeSuggestion,
|
selectComposeSuggestion,
|
||||||
} from '../../../actions/compose';
|
} from '../../../actions/compose';
|
||||||
import PollForm from '../components/poll-form';
|
import PollForm from '../components/polls/poll-form';
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
suggestions: state.getIn(['compose', 'suggestions']),
|
suggestions: state.getIn(['compose', 'suggestions']),
|
||||||
|
|
Ładowanie…
Reference in New Issue