Use selected topic when clearing publish topic, also focus input element

This commit is contained in:
Thomas Nordquist
2020-04-15 22:23:18 +02:00
parent 28743ba646
commit e24e505cc0
3 changed files with 13 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import { createReducer } from './lib'
export interface PublishState {
topic?: string
manualTopic?: string
payload?: string
retain: boolean
editorMode: string
@@ -59,7 +59,7 @@ export const publishReducer = createReducer(initialState, {
function setTopic(state: PublishState, action: SetTopic) {
return {
...state,
topic: action.topic,
manualTopic: action.topic,
}
}