5htp-core 0.5.9-51 → 0.5.9-52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/Select.tsx +9 -4
- package/package.json +1 -1
- package/types/icons.d.ts +1 -1
|
@@ -28,7 +28,10 @@ export type Props = SelectProps & InputBaseProps<ComboboxItem> & {
|
|
|
28
28
|
|
|
29
29
|
export type Choice = ComboboxItem;
|
|
30
30
|
|
|
31
|
-
const ensureChoice = (
|
|
31
|
+
const ensureChoice = (
|
|
32
|
+
choice: ComboboxItem | string,
|
|
33
|
+
choices: ComboboxItem[]
|
|
34
|
+
): ComboboxItem => {
|
|
32
35
|
|
|
33
36
|
// Allready a choice
|
|
34
37
|
if (typeof choice === 'object' && choice.label) {
|
|
@@ -128,15 +131,17 @@ export default (initProps: Props) => {
|
|
|
128
131
|
if (multiple) {
|
|
129
132
|
Component = MantineMultiSelect;
|
|
130
133
|
props.value = current ? current.map( c => ensureChoice(c, choices).value ) : [];
|
|
131
|
-
props.onChange = (value: string[]) =>
|
|
134
|
+
props.onChange = (value: string[]) => {
|
|
135
|
+
onChange( value.map(valueToChoice) )
|
|
136
|
+
};
|
|
132
137
|
} else {
|
|
133
138
|
Component = MantineSelect;
|
|
134
139
|
props.value = current ? ensureChoice(current, choices).value : '';
|
|
135
140
|
props.onChange = (value: string) => onChange( valueToChoice(value) );
|
|
136
141
|
}
|
|
137
142
|
|
|
138
|
-
if (props.placeholder === '
|
|
139
|
-
console.log(
|
|
143
|
+
if (props.placeholder === 'Languages') {
|
|
144
|
+
console.log("CHOICES", current, props.value);
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
/*----------------------------------
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp-core",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.5.9-
|
|
4
|
+
"version": "0.5.9-52",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp-core.git",
|
|
7
7
|
"license": "MIT",
|
package/types/icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TIcones = "times"|"solid/spinner-third"|"long-arrow-right"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"chart-bar"|"planet-ringed"|"
|
|
1
|
+
export type TIcones = "times"|"solid/spinner-third"|"long-arrow-right"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"rocket"|"chart-bar"|"planet-ringed"|"brands/linkedin"|"user-circle"|"crosshairs"|"plus-circle"|"comments-alt"|"arrow-right"|"user-shield"|"shield-alt"|"chart-line"|"money-bill-wave"|"star"|"link"|"file-alt"|"long-arrow-left"|"key"|"user"|"at"|"user-plus"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"times-circle"|"calendar-alt"|"paper-plane"|"search"|"lightbulb"|"magnet"|"angle-up"|"angle-down"|"solid/crown"|"brands/discord"|"pen"|"plus"|"file"|"envelope"|"binoculars"|"info-circle"|"check-circle"|"exclamation-circle"|"check"|"arrow-left"|"trash"|"meh-rolling-eyes"|"bars"|"solid/star"|"solid/star-half-alt"|"regular/star"|"chevron-left"|"cog"|"power-off"|"question-circle"|"play"|"minus-circle"|"external-link"|"plane-departure"|"wind"|"map-marker-alt"|"clock"|"arrow-to-bottom"|"ellipsis-h"|"usd-circle"|"users"|"home-alt"|"trophy"|"building"|"unlink"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"code"|"font"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"
|