Skip to content

Commit

Permalink
Story cases for valueInput
Browse files Browse the repository at this point in the history
  • Loading branch information
hextraza committed May 7, 2024
1 parent 094e0a7 commit 03544eb
Showing 1 changed file with 94 additions and 3 deletions.
97 changes: 94 additions & 3 deletions stories/Field-type-info.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,99 @@ export default {
args: { handleFilterChange: fn() },
};

export const Primary = {

export const SingleInputNoAllowableValues = {
args: {
filter: {
field: 'exampleField',
operator: '=',
value: 'singleValue'
},
index: 1,
highlightedInputs: [{field: "", operator: "", value: ""}],
allowedGroupNames: null,
fieldTypeInfo: [
{
name: 'exampleField',
label: 'Example Field',
description: 'A field that allows a single value with no specific allowable values.',
type: 'string',
isInDefaultColumns: true,
isMultiValued: false,
isHidden: false,
colWidth: 100,
formatString: '',
orderKey: 1,
allowableValues: [],
category: '',
url: '',
flex: 1,
supportsFilter: true
}
]
}
};

},
};
export const MultiInputWithAllowableValues = {
args: {
filter: {
field: 'multiExampleField',
operator: 'IN',
value: 'value1,value2'
},
index: 2,
highlightedInputs: [{field: "", operator: "", value: ""}],
allowedGroupNames: null,
fieldTypeInfo: [
{
name: 'multiExampleField',
label: 'Multi-Example Field',
description: 'A field that allows multiple values with specific allowable values.',
type: 'string',
isInDefaultColumns: true,
isMultiValued: true,
isHidden: false,
colWidth: 150,
formatString: '',
orderKey: 2,
allowableValues: ['value1', 'value2', 'value3', 'value4', 'value5', 'value6', 'value7', 'value8', 'value9', 'value10', 'value11'],
category: '',
url: '',
flex: 1,
supportsFilter: true
}
]
}
}

export const InSetWithGroupNames = {
args: {
filter: {
field: 'groupExampleField',
operator: 'in set',
value: 'group1'
},
index: 3,
highlightedInputs: [{field: false, operator: true, value: true}],
allowedGroupNames: ['group1', 'group2', 'group3', 'group4'],
fieldTypeInfo: [
{
name: 'groupExampleField',
label: 'Group Example Field',
description: 'A field with the operator "in set" and selectable group names.',
type: 'string',
isInDefaultColumns: true,
isMultiValued: false,
isHidden: false,
colWidth: 150,
formatString: '',
orderKey: 3,
allowableValues: [],
category: '',
url: '',
flex: 1,
supportsFilter: true
}
]
}
}

0 comments on commit 03544eb

Please sign in to comment.