mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
always consider empty strings as no value given
This commit is contained in:
@@ -11,10 +11,23 @@ import { IDocProps } from '../interfaces/IDocProps'
|
||||
|
||||
export default function App() {
|
||||
const [options, setOptions] = useState<IDocProps>({
|
||||
address: 'Max Mustermann\\\\Musterstrasse\\\\12345 Musterstadt',
|
||||
body: 'Inhalt des Briefs',
|
||||
closing: 'Mit freundlichen Grüßen',
|
||||
customer: '',
|
||||
date: new Date().toLocaleDateString('de-DE'),
|
||||
enclosing: '',
|
||||
invoice: '',
|
||||
myRef: '',
|
||||
opening: 'Sehr geehrte Damen und Herren',
|
||||
ps: '',
|
||||
signature: '',
|
||||
specialMail: '',
|
||||
subject: 'Betreffzeile',
|
||||
template: 'brief-fam',
|
||||
subject: '',
|
||||
body: '',
|
||||
address: '',
|
||||
yourMail: '',
|
||||
yourRef: '',
|
||||
yourRefName: '',
|
||||
})
|
||||
const [latest, setLatest] = useState<ILatest[]>([])
|
||||
const [pdfUrl, setPdfUrl] = useState<string | null>(null)
|
||||
@@ -32,7 +45,7 @@ export default function App() {
|
||||
return
|
||||
}
|
||||
const value = event && event.target && event.target.value
|
||||
setOptions({ ...options, [name]: value || undefined })
|
||||
setOptions({ ...options, [name]: value })
|
||||
}
|
||||
|
||||
const _onSelectLatest = (selectedOption: ILatest) => {
|
||||
|
||||
Reference in New Issue
Block a user