mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 09:53:48 +00:00
small QOL improvements (#37)
* feat: selected event if is first * style: fix wrap - remove wrap tag (broken in firefox) * feat: add more text to notes this is a quick fix and does not replace the real deal. using a text input makes it difficult to edit, this should be revised with a textarea on note field * upgrade electron * Stage timer in /sm has placeholder when not running * fix style issue where clock would move depending on whether there are events selected * ensure ontime logo and text have a minimum readable size * fix scrollbar styling * clean debugging logs * link to latest release using gitreleases.dev service for this. this is a temporary fix until we have a release (in opposition to pre-release) so we can use githubs latest link * scale gracefully * fixed error with naming of maxChar
This commit is contained in:
@@ -5,6 +5,7 @@ import style from './EditableText.module.css';
|
||||
export default function EditableText(props) {
|
||||
const { label, defaultValue, placeholder, submitHandler, ...rest } = props;
|
||||
const [text, setText] = useState(defaultValue || '');
|
||||
const maxchar = props.maxchar || 40;
|
||||
|
||||
useEffect(() => {
|
||||
if (defaultValue == null) setText('');
|
||||
@@ -18,7 +19,7 @@ export default function EditableText(props) {
|
||||
};
|
||||
|
||||
const handleChange = (val) => {
|
||||
if (val.length < 40) setText(val);
|
||||
if (val.length < maxchar) setText(val);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user