ericrsmith35 / DatatableV2

28 stars 24 forks source link

Datatable with 'Single row selection only = true' shows with multi-selection #75

Closed kdoruibin closed 2 years ago

kdoruibin commented 2 years ago

Datatable Version#: 3.4.5 Datatable is configured to only allow for single row selection: image

For some reason, these settings are not working when viewing the datatable: image

Flow Metadata:

                <fields>
                    <name>overviewOfSelectableWorkOrders_0</name>
                    <dataTypeMappings>
                        <typeName>T</typeName>
                        <typeValue>WorkOrder</typeValue>
                    </dataTypeMappings>
                    <extensionName>c:datatable</extensionName>
                    <fieldType>ComponentInstance</fieldType>
                    <inputParameters>
                        <name>objectName</name>
                        <value>
                            <stringValue>WorkOrder</stringValue>
                        </value>
                    </inputParameters>
                    <inputParameters>
                        <name>tableData</name>
                        <value>
                            <elementReference>getChildWorkOrders</elementReference>
                        </value>
                    </inputParameters>
                    <inputParameters>
                        <name>columnFields</name>
                        <value>
                            <stringValue>WorkOrderNumber, Subject, Priority,AssetId, StartDate, EndDate</stringValue>
                        </value>
                    </inputParameters>
                    <inputParameters>
                        <name>columnEdits</name>
                        <value>
                            <stringValue>Subject:true, Priority:true,StartDate:true, EndDate:true</stringValue>
                        </value>
                    </inputParameters>
                    <inputParameters>
                        <name>singleRowSelection</name>
                        <value>
                            <booleanValue>true</booleanValue>
                        </value>
                    </inputParameters>
                    <inputParameters>
                        <name>cb_singleRowSelection</name>
                        <value>
                            <stringValue>CB_TRUE</stringValue>
                        </value>
                    </inputParameters>
                    <inputsOnNextNavToAssocScrn>UseStoredValues</inputsOnNextNavToAssocScrn>
                    <isRequired>true</isRequired>
                    <outputParameters>
                        <assignToReference>EditedWorkOrders</assignToReference>
                        <name>outputEditedRows</name>
                    </outputParameters>
                    <outputParameters>
                        <assignToReference>selectedWorkOrders</assignToReference>
                        <name>outputSelectedRows</name>
                    </outputParameters>
                </fields>
ericrsmith35 commented 2 years ago

I haven't seen this issue before and I'm not able to reproduce it. Have you tried creating a different flow to see if it is happening there as well?

kdoruibin commented 2 years ago

Hey @ericrsmith35, I have another datatable configured in the same manner later on in my flow, that one works as expected.

It looks like this.cb_singleRowSelection is undefined image

However, I was able to "fix" the issue by:

  1. Unchecking 'Single row selection only'
  2. Saved the flow as a new version
  3. Checking 'Single row selection only'
  4. Saved the flow as a new version

It then looks like this.cb_singleRowSelection is correctly set image

ericrsmith35 commented 2 years ago

I'm glad you were able to get it working.