Commit Graph

16 Commits

Author SHA1 Message Date
ralf
7dc591b2c9 fix TypeError this === undefined 2022-06-17 22:43:35 +02:00
ralf
980f7cb0df fix first category was always selected in calendar.edit as somehow select_options were set before multiple
removed the deduplicate select-first-option code now in favor of the one in firstUpdate
also automatic convert empty_label for et2-select multiple into a placeholder
2022-06-13 14:39:01 +02:00
nathan
cf151afff8 Clean up some TypeScript type issues
Putting the constructor type fixes some complaints about our widgets not being LitElements
2022-06-10 10:25:31 -06:00
nathan
45ccceb1c7 Fix Et2Select was losing options set in template
All JS tests now pass.  yay.
2022-06-08 14:57:26 -06:00
ralf
fc227f82d0 fix TypeError, if no options are set and remove unnecessary getValue() 2022-06-02 16:29:58 +02:00
ralf
a9e180a9fb fix mixup of this.value, Lion this.modelValue and old get/set_value
causing eg. numeric values not to be cast to string and therefore not selecting their option
2022-06-02 16:12:38 +02:00
ralf
c251e2f185 remove removing of empty description and label widgets
also make sure option.value is a string, as sl-select seems to use === to calculate matches so option with value 0 is not selected by a value of '0'
2022-06-02 13:45:34 +02:00
nathan
2b68b6cbbe Work on LinkEntry
- fix missing app select
- add clear button
- use request() instead of json() to query server
- add optional class property to SelectOption
- move cleaning select options to its own function so we can use it anywhere
- Use separate render to keep local / remote options separate.  Local options stay in select_options.
2022-06-01 09:25:11 -06:00
ralf
0aa813a0ff got LinkEntry mostly working 2022-06-01 16:05:34 +02:00
nathan
c572fa637d Fix conflict between Et2Select static type options & custom options resulted in losing the type options 2022-05-31 13:41:39 -06:00
nathan
17d2e2cb5c Change style of parameter type declaration to make sure it transformAttributes handles it correctly. Objects were still parsed as string, resulting in "[Object object]" 2022-05-13 14:22:44 -06:00
nathan
de0c9aa3f4 Fix incorrect type issues on options 2022-05-13 09:02:22 -06:00
ralf
b9cca9c5ff using set/get select_option plus a set_selection_options marked as deprecated
- get_select_options seems to be nowhere in use, so I did not implement it
- Et2Select* widgets with static options assign them in their constructor (like the r/o ones)
- removed a jQuery.proxy call, which we dont want in new code
2022-03-16 22:36:43 +02:00
nathan
aff71549a2 Move some code out of Et2Select into parent mixin for better re-use
Any child that has selectbox type functionality (extends Et2WidgetWithSelectMixin) needs to implement:
- _optionTargetNode() : HTMLElement
- _optionTemplate(option : SelectOption) : TemplateResult
2022-03-03 10:38:56 -07:00
ralf
36e3bd5de0 fix typo modalValue instead of modelValue to get validation (required) working
Had to overwrite formatter as it gave an error for accessing not yet set _inputNode
2022-03-01 16:51:40 +02:00
Hadi Nategh
08549e25da Make Et2WidgetWithSelect a Dedup Mixin in order to make it available cross widgets 2022-03-01 12:35:33 +01:00