Skip to content

Commit

Permalink
fix: remove changes in availableValues
Browse files Browse the repository at this point in the history
  • Loading branch information
cscovinopsh committed Mar 26, 2021
1 parent 03cc2cf commit 192ee5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/decorators/property/property-decorator.ts
Expand Up @@ -144,7 +144,7 @@ class PropertyDecorator {
*
* @returns {Array<{value: string, label: string}>}
*/
availableValues(): null | Array<{value: string | number; label: string}> {
availableValues(): null | Array<{value: string; label: string}> {
if (this.options.availableValues) {
return this.options.availableValues
}
Expand Down
Expand Up @@ -54,7 +54,7 @@ export default interface PropertyOptions {
* in the UI you will see select box instead of the input
*/
availableValues?: Array<{
value: string | number;
value: string;
label: string;
}>;

Expand Down
Expand Up @@ -26,7 +26,7 @@ export interface PropertyJSON {
/**
* If property has restricted number of values
*/
availableValues: Array<{label: string; value: string | number}> | null;
availableValues: Array<{label: string; value: string}> | null;
/**
* Property uniq name
*/
Expand Down

2 comments on commit 192ee5a

@dziraf
Copy link
Contributor

@dziraf dziraf commented on 192ee5a Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should it look like currently because I'm confused now?

#793 added number to allowed types and it looks to be the case:
https://github.com/SoftwareBrothers/admin-bro/blob/beta/src/backend/decorators/property/property-decorator.ts#L147

@cscovino
Copy link
Contributor

@cscovino cscovino commented on 192ee5a Apr 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no no, sorry my mistake. It is ok.
I deleted my comment.

Please sign in to comment.